Re: [xml] Document comments
- From: Aleksey Sanin <aleksey aleksey com>
- To: Bjorn Reese <breese mail1 stofanet dk>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Document comments
- Date: Wed, 09 Apr 2003 07:04:02 -0700
Bjorn Reese wrote:
set yet or if the root is already in place use xmlDocGetRootElement()
and xmlAddPrevSibling(root, comment) .
This does not seem to work. The comment does not appear in the output.
As far as I can understand, this does not work because the root element
has "parent"
equal to NULL and document "children" pointer is not updated. What you
can do is
to update it manually:
root = xmlDocGetRootElement(doc);
tmp = xmlAddPrevSibling(root, comment);
if(doc->children == root) {
doc->children = tmp;
}
Aleksey
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]