{
const char *s = (char *) xmlGetProp (node, (xmlChar *) attr);
if (s)
- printf ("%s %s\n", node->name, s);
+ printf ("%s %s=%s\n", node->name, attr, s);
print_attribute (node->children, attr);
}
}
+static xmlNode *
+find_page_setup (xmlNode *node)
+{
+ for (; node; node = node->next)
+ {
+ if (node->name && !strcmp ((char *) node->name, "pageSetup"))
+ return node;
+
+ xmlNode *ps = find_page_setup (node->children);
+ if (ps)
+ return ps;
+ }
+ return NULL;
+}
+
static void
print_text (xmlNode *node)
{
}
xmlNode *root = xmlDocGetRootElement(doc);
+ root = find_page_setup(root);
+ if (!root)
+ return 0;
+ root->next = NULL;
if (!strcmp(argv[2], "containment"))
print_containment (root);