SYNOPSISxmlNode xmlTreeNewElement(xmlNode parent, string name,
[, string content[, xmlNs ns]])
Parameters:
parent
- the xmlNode
to create the element onname
- the name of the new elementcontent
(optional) - the text content for the elementns
(optional) - the namespace to use for the element
Returns:
xmlNode
for the new element
DESCRIPTIONxmlTreeNewElement()
creates a new element as a child of
parent
. If the parent is an element in an xmlns namespace, the child
will automatically be created in the same namespace.
EXAMPLE<$elem1 = (xmlTreeNewElement($root, 'item'))>
SEE ALSOxmlTreeNewPI
,
xmlTreeNewText
,
xmlTreeNewCDATA
,
xmlTreeNewComment