SYNOPSISxmlNode xmlTreeAddChildList(xmlNode parent, xmlNode child)
Parameters:
parent
- The node that you want to assign the
child
tochild
- The first node in the list of children that you
want to assign to parent
Returns:
child
DESCRIPTIONxmlTreeAddChildList()
assigns the child
and the rest of
its siblings as children of the parent
.
EXAMPLE
Given the XML document
<top>
<item>item 1</item>
<item>item 2</item>
<summary>
<name>Squiggy</name>
<detail>fuzzy</detail>
<color>blue</color>
<size>big</size>
</summary>
</top>
The command
<$ret = (xmlTreeAddChildList($top, $detail))>
Would result in:
<top>
<item>item 1</item>
<item>item 2</item>
<summary>
<name>Squiggy</name>
</summary>
<detail>fuzzy</detail>
<color>blue</color>
<size>big</size>
</top>
CAVEATS
If this operations results in two text nodes being siblings of each
other, the second node will be merged into the first and then
unlinked. Any changes made to the second text node will not be
reflected in the tree.
SEE ALSOxmlTreeAddChild
,
xmlTreeAddChildList
,
xmlTreeAddNextSibling
,
xmlTreeAddPrevSibling
,
xmlTreeAddSibling
,
xmlTreeSetRootElement