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

unixml: update test

parent bafefc79
...@@ -8,13 +8,14 @@ using namespace std; ...@@ -8,13 +8,14 @@ using namespace std;
int main() int main()
{ {
try /* try
{ {
*/
UniXML xml("test.xml"); UniXML xml("test.xml");
xmlNode* cnode = xml.findNode(xml.getFirstNode(),"testnode"); xmlNode* cnode = xml.findNode(xml.getFirstNode(),"UniSet");
if( !cnode ) if( cnode == NULL )
{ {
cerr << "<testnode> not found" << endl; cerr << "<testnode> not found" << endl;
return 1; return 1;
} }
...@@ -24,6 +25,19 @@ int main() ...@@ -24,6 +25,19 @@ int main()
<< " int id=" << it.getIntProp("id") << " int id=" << it.getIntProp("id")
<< endl; << 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 ) catch( UniSetTypes::Exception& ex )
{ {
...@@ -35,6 +49,6 @@ int main() ...@@ -35,6 +49,6 @@ int main()
cerr << "catch ... " << endl; cerr << "catch ... " << endl;
return 1; return 1;
} }
*/
return 0; 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