Re: [xml] XInclude use in code?



On Fri, Nov 21, 2003 at 10:15:43AM -0500, Paul Robert Hayes wrote:
I have been working to get the Xinclude in libxml working.  In the sample
below, the file is correctly parse and ?dumped? with the xinclude still in
the file and then after the xmlXIncludeProcess() command correctly dumps the
file with the right included data.

  So the XInclude process was successful.

The problems arises when I then traverse the root element through
xmlDocGetRootElement(doc) which does not appear to have had the Xincludes
correctly added into the tree as it still detects the xincludes in the tree
and not the data that should have replaced it.

  The way you traverse the tree is probably buggy. Apparently you
don't check the node type and that's probably why you get confused.
The XInclude element node get turned into an XInclude start. And if the
dump show the included data they are obviously in the tree.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]