DOMDocument->createElement

(no version information, might be only in CVS)

DOMDocument->createElement -- Create new element node

Description

DOMElement DOMDocument->createElement ( string name [, string value])

This function returns a new instance of class DOMElement. The tag name of the element is the value of the name parameter. Optionally, a value for the new element may also be passed in. This node will not show up in the document unless it is inserted with e.g. DOMNode->appendChild().

The return value is FALSE if an error occurred.

See also DOMDocument->createElementNS(), DOMNode->appendChild(), DOMDocument->createTextNode(), DOMDocument->createComment(), DOMDocument->createAttribute(), DOMDocument->createProcessingInstruction().