1
0
mirror of https://github.com/netsurf-browser/netsurf synced 2024-12-18 10:13:24 +03:00

Simplify code using xmlDocGetRootElement().

svn path=/trunk/netsurf/; revision=4201
This commit is contained in:
James Bursa 2008-05-25 22:31:42 +00:00
parent 793d466edf
commit 70da04d69e

View File

@ -427,10 +427,7 @@ bool html_convert(struct content *c, int width, int height)
} }
/* locate html and head elements */ /* locate html and head elements */
for (html = document->children; html = xmlDocGetRootElement(document);
html != 0 && html->type != XML_ELEMENT_NODE;
html = html->next)
;
if (html == 0 || strcmp((const char *) html->name, "html") != 0) { if (html == 0 || strcmp((const char *) html->name, "html") != 0) {
LOG(("html element not found")); LOG(("html element not found"));
xmlFreeDoc(document); xmlFreeDoc(document);