Re: [xml] xmlNodeAddContent causes segmentation violation error



Aha!  The XML_PARSE_NODICT is exactly what I want, thank you.

   In the original program, where I saw the problem first, I
did use the xmlXIncludeProcess() on the result.  I dropped 
it from the test program because it was not necessary to 
producing the SIGSEGV. 

   But I think I misunderstood you: you are, I think, telling
me how to get the XInclude to work, *not* how to avoid the
SIGSEGV. . .

CJG

On Fri, Jan 02, 2004 at 03:51:15PM -0500, Daniel Veillard wrote:
On Fri, Jan 02, 2004 at 12:39:55PM -0800, Christopher J. Grayce wrote:
Thanks, Daniel.

   By the way, I thought I *did* use the XML_PARSE_INCLUDE option in the 
program I wrote, please see my previous message; it doesn't
seem to have prevented the problem in this case.  Have I 
misunderstood your suggestion?  

First XML_PARSE_INCLUDE is not handled yet at the parser level as an option
except for the xmlReader, I will do this only once XInclude becomes a W3C
Recommendation, in the meantime use xmlXIncludeProcess() on the result.

Second use the option XML_PARSE_NODICT to avoid the problem you saw,
i.e.:

  int options = XML_PARSE_XINCLUDE | XML_PARSE_NODICT;

instead of 

  xmlParserOption options = XML_PARSE_XINCLUDE ;

The options argument is an int, not an xmlParserOption, and that int
is built by or'ing the options selected (or 0).

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]