standard.lib.xml.xmlNewTextChild

xmlNewTextChild is available since version 1.0.

Prototype:

number xmlNewTextChild(number parent, number ns, string name, string content)

Parameters

parent
the parent node handle
namespace
the namespace handle, if any
name
the name of the child
content
the content of the child, if any

Description:

Creation of a new child element, added at the end of parent children list. ns and content parameters are optional (null and empty string). If ns is null, the newly created element inherits the namespace of parent. If content is not an empty string, a child TEXT node will be created containing the string content.

NOTE: Use xmlNewChild if content will contain entities that need to be preserved. Use this function, if you need to ensure that reserved XML chars that might appear in content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.

Return value:

Returns a handle to the new node or null if failed.