standard.lib.xml.xmlAddChild

xmlAddChild is available since version 1.0.

Prototype:

number xmlAddChild(number parent, number cur)

Parameters

parent
the parent node
cur
the child node

Description:

Add a new node to parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case cur is freed). 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 child node or null in case of error.