8 int main(int argc, char **argv)
14 /* File name must be given */
16 printf("Usage: %s file\n", argv[0]);
20 /* Read the XML. Print error and line number */
21 if (OS_ReadXML(argv[1], &xml) < 0) {
22 printf("OS_ReadXML error: %s, line :%d\n", xml.err, xml.err_line);
26 if (OS_ApplyVariables(&xml) != 0) {
27 printf("OS_ReadXML error: Applying variables: %s\n", xml.err);
32 node = OS_GetElementsbyNode(&xml, NULL);
34 printf("OS_GetElementsbyNode error: %s, line: %d\n", xml.err, xml.err_line);
44 cnode = OS_GetElementsbyNode(&xml, node[i]);
51 printf("Element: %s -> %s\n",
54 if (cnode[j]->attributes && cnode[j]->values) {
56 while (cnode[j]->attributes[k]) {
57 printf("attr %s:%s\n",
58 cnode[j]->attributes[k],