xmlTreeNewElement

SYNOPSIS

xmlNode xmlTreeNewElement(xmlNode parent, string name,
                              [, string content[, xmlNs ns]])

Parameters:

  • parent - the xmlNode to create the element on

  • name - the name of the new element

  • content (optional) - the text content for the element

  • ns (optional) - the namespace to use for the element

Returns:

  • the xmlNode for the new element


DESCRIPTION
xmlTreeNewElement() 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 ALSO
xmlTreeNewPI, xmlTreeNewText, xmlTreeNewCDATA, xmlTreeNewComment


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.