[xml] Inserting document fragment
- From: Kris Breuker <kris b-lex nl>
- To: xml gnome org
- Subject: [xml] Inserting document fragment
- Date: Thu, 21 Sep 2006 11:18:04 +0200
Hi,
When I insert a document fragment node (XML_DOCUMENT_FRAG_NODE) into the
XML tree (for example using xmlAddChild), the node itself gets inserted
instead of its child nodes. This is a bit inconvenient because I am
writing a DOM api for a scripting language we're developing here, and
the specification
(http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-B63ED1A3) states:
Furthermore, various operations -- such as inserting nodes as
children of another Node -- may take DocumentFragment objects as
arguments; this results in all the child nodes of the
DocumentFragment being moved to the child list of this node.
I know I can use xmlAddChildList with the children property of the
document fragment node, but there are no such functions for
xmlAddPrevSibling (i.e. xmlAddPrevSiblingList). Is there an easy way of
inserting the children of a document fragment instead of the document
fragment itself?
Kris Breuker
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]