|
February 6, 2002 Particular-Type Node Generation Tips: February 2002
Yehuda Shiran, Ph.D.
|
|
The DOMDocument object exposes both the generic createNode() method as well as methods to create particular-type nodes, such as the createElement() method. Creating an element with this method is the same as creating a node with createNode() where the type is "element" and no namespace is specified. In order to create a namespace-qualified attribute, use the createNode() method. You can only set the name of the element with createElement(). Set the text property of the node to set the content of the element.
Notice that when you create the
People who read this tip also read these tips: Look for similar tips by subject: |