On Thu, Jun 30, 2005 at 07:58:35PM -0400, Joel McConaughy wrote: > I am using xmlNodeDumpOutput() to display the results of an xpath expression. > If the nodeset contains CDATA sections, the output includes <![CDATA and ]]>. > From the docs, it sounds like this should be stripped. Is this expected > behavior? If so, is there a way to have this stripped? Thanks. > > libxml2 v2.6.16-7
You didn't ask the parser to replace CDATA section, so libxml2 keep them in the tree. Libxml2 has no way to guess how you are gonna use the document you want to parse, so you *must* ajust the parsing options to reflects this and use XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOCDATA to parse option when expecting XPath processing. Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
