standard.lib.xml.xmlAddPrevSibling

xmlAddPrevSibling is available since version 1.0.

Prototype:

number xmlAddPrevSibling(number cur, number elem)

Parameters

cur
the child node
elem
the new node

Description:

Add a new node elem as the previous sibling of cur merging adjacent TEXT nodes (elem may be freed). If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.

Return value:

Returns the new node or null in case of error.