+static __attribute__((unused)) 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)
+{
+ for (; node; node = node->next)
+ {
+ if (node->type == XML_ELEMENT_NODE)
+ {
+ printf ("%s", node->name);
+ for (xmlNode *child = node->children; child; child = child->next)
+ if (child->type == XML_TEXT_NODE)
+ {
+ putchar (' ');
+ print_string (child->content);
+ }
+ putchar ('\n');
+ }
+
+ print_text (node->children);
+ }
+}
+