+
+static int match_xsd_XML_n(xmlNodePtr ptr, const char *elem, ODR o,
+ char **val, int *len)
+{
+ xmlBufferPtr buf;
+
+ if (!match_element(ptr, elem))
+ return 0;
+ printf ("match_xsd_XML_n: %s\n", elem);
+ ptr = ptr->children;
+ if (!ptr)
+ {
+ printf ("match_xsd_XML: no TEXT node\n");
+ return 0;
+ }
+ buf = xmlBufferCreate();
+
+ xmlNodeDump(buf, ptr->doc, ptr, 0, 0);
+
+ *val = odr_malloc(o, buf->use+1);
+ memcpy (*val, buf->content, buf->use);
+ (*val)[buf->use] = '\0';
+
+ if (len)
+ *len = buf->use;
+
+ xmlBufferFree(buf);
+
+ printf ("match_XML_string: OK content=%s\n", *val);
+ return 1;
+}
+