X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_xml%2Fexamples%2Ftest.c;h=166a2b6cf1acccf50d1c66e802933c657ae36b51;hp=89369d5f1a0f724a1b57547a04f696c87f74bb13;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/os_xml/examples/test.c b/src/os_xml/examples/test.c index 89369d5..166a2b6 100755 --- a/src/os_xml/examples/test.c +++ b/src/os_xml/examples/test.c @@ -10,7 +10,7 @@ int main(int argc, char ** argv) OS_XML xml; XML_NODE node = NULL; - + /* File name must be given */ if(argc < 2) { @@ -18,8 +18,8 @@ int main(int argc, char ** argv) return(-1); } - - /* Reading the XML. Printing error and line number */ + + /* Reading the XML. Printing error and line number */ if(OS_ReadXML(argv[1],&xml) < 0) { printf("OS_ReadXML error: %s, line :%d\n",xml.err, xml.err_line); @@ -46,17 +46,17 @@ int main(int argc, char ** argv) { int j = 0; XML_NODE cnode; - + cnode = OS_GetElementsbyNode(&xml, node[i]); if(cnode == NULL) { i++; continue; } - + while(cnode[j]) { - printf("Element: %s -> %s\n", + printf("Element: %s -> %s\n", cnode[j]->element, cnode[j]->content); if(cnode[j]->attributes && cnode[j]->values)