From 166139d5aff0e906de8fcb8ebfc8dcbeb7e2a9f8 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Mon, 9 Feb 2009 00:37:25 -0200 Subject: [PATCH] Change lookup method to find if content is of XML type. 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). --- atom/content.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/content.c b/atom/content.c index 7d1ed49..4dea453 100644 --- a/atom/content.c +++ b/atom/content.c @@ -77,7 +77,10 @@ atom_content_new_from_xmlnode (xmlNodePtr root) 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); } -- 2.20.1