Re: [xml] Pasting fragment
- From: Daniel Veillard <veillard redhat com>
- To: chrisbee xml swing be
- Cc: xml gnome org
- Subject: Re: [xml] Pasting fragment
- Date: Thu, 22 Aug 2002 11:09:35 -0400
On Thu, Aug 22, 2002 at 04:51:43PM +0200, chrisbee xml swing be wrote:
On Thu, Aug 22, 2002 at 03:50:37PM +0200, chrisbee xml swing be wrote:
On Thu, Aug 22, 2002 at 01:41:52PM +0200, chrisbee xml swing be wrote:
looks okay a priori. But I really can't understand why you don't
want to pass node->doc to xmlParseBalancedChunkMemory() , to later
update it everywhere in the resulting nodes ... This makes absolutely no
sense to me !
Because I do some tests before and calling xmlParseBalancedChunkMemory()
initialized doc->children with the result node llist. But it seems that
this happens only if doc->children is NULL (Is this a bug ?). At this
I don't see in the code how this could happen. It doesn't touch
doc->children !
Yes, it does !
Here is the Call Stack ...
5. startElement()
4. xmlParseStartTag()
3. xmlParseElement()
2. xmlParseContent()
1. xmlParseBalancedChunkMemory()
and the lines that modify children
if (ctxt->myDoc->children == NULL) {
#ifdef DEBUG_SAX_TREE
xmlGenericError(xmlGenericErrorContext, \"Setting %s as root\\n\", name);
#endif
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
Grumble, xmlParseBalancedChunkMemoryRecover() try to take care of it
but in the extreme case where doc has no children the input document is
modified. Please report it in bugzilla so it doesn't fall through the cracks...
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]