DOMDocument->createElement

(no version information, might be only in CVS)

DOMDocument->createElement -- Create new element node

Description

object 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. 本节点不会出现在文档中,除非是用例如 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().