We now search for an element node amongst all children of the content
element. If we find one, we assume its of XML type (since the spec
requires that other types do not have XML elements anyway).
XML child or a content child. Using the type attribute might
be a good idead. Let's just ask that the current method
works. */
- if (root->children && root->children->type == XML_ELEMENT_NODE)
+ child = root->children;
+ while (child && child->type != XML_ELEMENT_NODE)
+ child = child->next;
+ if (child)
{
content->xmlcontent = xmlCopyNodeList (root->children);
}