SYNOPSISxmlNode xmlTreeAddSibling(xmlNode node, xmlNode sibling)
Parameters:
node
- the xmlNode
that the sibling
is
being added next tosibling
- the xmlNode
that is being added to the
node
's list of siblings.
Returns:
sibling
DESCRIPTIONxmlTreeAddSibling()
adds sibling
as a sibling of
node
. This is the same as calling xmlTreeAddChild()
using
node
's parent as the parent
parameter.
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>
<other>stuff</other>
</top>
The command
<$ret = (xmlTreeAddSibling($summary, $detail))>
Would result in:
<top>
<item>item 1</item>
<item>item 2</item>
<summary>
<name>Squiggy</name>
<color>blue</color>
<size>big</size>
</summary>
<detail>fuzzy</detail>
<other>stuff</other>
</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
,
xmlTreeAddSibling
,
xmlTreeSetRootElement