Re: [xml] xinclude and xmlParseChunk
- From: Lucian Smith <lpsmith spod-central org>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] xinclude and xmlParseChunk
- Date: Wed, 2 Mar 2011 21:00:12 +0000
* Daniel Veillard <veillard redhat com> [2011-03-02 06:31] writes:
On Tue, Mar 01, 2011 at 10:14:30PM +0000, Lucian Smith wrote:
Hello, all. I am investigating how to modify a system that currently uses
libxml, with its core parsing done by calling the function
'xmlParseChunk'.
I would like to expand the capabilities of the system to allow it to
expand xinclude directives. However, all the ways I have discovered to do
this seem to be incompatible with only using xmlParseChunk--the
'xmlCtxtUseOptions' function does not even check the XML_PARSE_XINCLUDE
flag.
Is there any way to access xinclude auto-expansion within 'xmlParseChunk'?
Or am I going to have to pre-process or post-process the data?
xmlParseChunk is somehow a hack, as it not full proper XML parsing.
XInclude itself is not integrated in the parse phase, it's always a
post processing option, for example "xmllint --xinclude" just calls
xmlXIncludeProcessFlags() on the resulting document.
You will have to use xmlXIncludeProcessTreeFlags() on all the top
element node that xmlParseChunk may return to you.
Aha--thanks! That's good to know. As far as I can tell, xmlParseChunk
does not return any xmlNodePtr's--am I wrong? If this is so, would I need
to construct my own xmlNode out of the information returned, and expand
that with xmlXIncludeProcessTreeFlags()?
-Lucian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]