diff --git a/ChangeLog b/ChangeLog index 6d1a1af8..e7dd110c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Apr 18 17:49:24 CEST 2002 Daniel Veillard + + * xpath.c: fix a problem with string() on a document node. + Thu Apr 18 16:40:42 CEST 2002 Daniel Veillard * Makefile.am xmlschemas.c: more Schemas work diff --git a/xpath.c b/xpath.c index 05ec0d2d..dc303fcf 100644 --- a/xpath.c +++ b/xpath.c @@ -3216,6 +3216,8 @@ xmlXPathCastNumberToString (double val) { */ xmlChar * xmlXPathCastNodeToString (xmlNodePtr node) { + if ((node != NULL) && (node->type == XML_DOCUMENT_NODE)) + node = xmlDocGetRootElement((xmlDocPtr) node); return(xmlNodeGetContent(node)); }