This topic describes the nodeName, nodeValue, and nodeType attributes. this topic describes the nodeName, nodeValue, and nodeType attributes in detail.
NodeNameThe attribute contains the name of a node.
The nodeName of the element node is the label name.
The nodeName of the attribute node is the attribute name.
The nodeName of the text node is always # text
The nodeName of the document node is always # document
Note: the tag name of the XML element contained by nodeName is always capitalized.
NodeValue
For text nodes, the nodeValue attribute contains text.
For an attribute node, the nodeValue attribute contains the attribute value.
The nodeValue attribute is unavailable for document nodes and element nodes.
NodeType
The nodeType attribute returns the node type.
The most important node types are:
Element type node type
Element 1
Attribute attr 2
Text 3
Comment comments 8
Document 9
The above is an XML Example Tutorial: detailed description of the nodeName, nodeValue, and nodeType attributes. For more information, see other related articles in the first PHP community!