7 int main(int argc, char ** argv)
14 /* File name must be given */
17 printf("Usage: %s file\n",argv[0]);
22 /* Reading the XML. Printing error and line number */
23 if(OS_ReadXML(argv[1],&xml) < 0)
25 printf("OS_ReadXML error: %s, line :%d\n",xml.err, xml.err_line);
29 if(OS_ApplyVariables(&xml) != 0)
31 printf("OS_ReadXML error: Applying variables: %s\n", xml.err);
35 /* Getting all nodes */
36 node = OS_GetElementsbyNode(&xml,NULL);
39 printf("OS_GetElementsbyNode error: %s, line: %d\n", xml.err, xml.err_line);
50 cnode = OS_GetElementsbyNode(&xml, node[i]);
59 printf("Element: %s -> %s\n",
62 if(cnode[j]->attributes && cnode[j]->values)
65 while(cnode[j]->attributes[k])
67 printf("attr %s:%s\n",
68 cnode[j]->attributes[k],
80 /* Clearing the nodes */