Commit 680ea494 authored by Vitaly Lipatov's avatar Vitaly Lipatov

unixml: update test

parent bafefc79
......@@ -8,13 +8,14 @@ using namespace std;
int main()
{
try
/* try
{
*/
UniXML xml("test.xml");
xmlNode* cnode = xml.findNode(xml.getFirstNode(),"testnode");
if( !cnode )
{
xmlNode* cnode = xml.findNode(xml.getFirstNode(),"UniSet");
if( cnode == NULL )
{
cerr << "<testnode> not found" << endl;
return 1;
}
......@@ -24,6 +25,19 @@ int main()
<< " int id=" << it.getIntProp("id")
<< endl;
{
UniXML_iterator it = xml.findNode(xml.getFirstNode(),"LocalInfoServer", "InfoServer");
if( it == NULL )
{
cerr << "<testnode> not found" << endl;
return 1;
}
cout << "string id=" << it.getProp("dbrepeat")
<< " int id=" << it.getIntProp("dbrepeat")
<< endl;
}
/*
}
catch( UniSetTypes::Exception& ex )
{
......@@ -35,6 +49,6 @@ int main()
cerr << "catch ... " << endl;
return 1;
}
*/
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment