FW: [xml] XInclude use in code?

"Buggy"  undoubtedly!  Yep, I have just started parsing XML and just started
using your routines as well.  (chuckle)  I am still trying to get an
understanding of the design style in the library for use and the examples
have been very helpful.

So the example that checks the name should be checking the type as well?

Or is it that the new "name" is Xinclude that I then need to parse in a

Part of the confusion comes from the fact that the docdump outputs the XML
file without any Xinclude tags in it which, to me, implies that the doc from
getrootelement() does not have them in it.

What was the original intent for use of the two subroutines in libxml?

Dr. Paul Robert Hayes
paulroberthayes earthlink net

-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com]
Sent: Friday, November 21, 2003 10:28 AM
To: Paul Robert Hayes
Cc: xml gnome org
Subject: 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
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
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 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]