+2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * xml.c (parse_region): Make the parsing work for
+ non-comment-starting XML files again (bug#9144).
+
2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
* image.c (gif_load): Fix calculation of bottom and right corner.
if (doc != NULL)
{
+ /* If the document is just comments, then this should get us the
+ nodes anyway. */
xmlNode *n = doc->children->next;
Lisp_Object r = Qnil;
n = n->next;
}
- if (NILP (result))
- result = r;
- else
+ if (NILP (result)) {
+ /* The document isn't just comments, so get the tree the
+ proper way. */
+ xmlNode *node = xmlDocGetRootElement (doc);
+ if (node != NULL)
+ result = make_dom (node);
+ } else
result = Fcons (intern ("top"),
Fcons (Qnil, Fnreverse (Fcons (r, result))));