DTD-Related Properties of the xmldom Object

This hour will conclude by presenting some additional properties of the xmldom object.

Table 5.4. Additional Properties of the xmldom Object
PropertyData TypeContains
urlStringThe URL of the most recently loaded document
validateOnParseBooleanIf true, document is validated when parsed; if false, it isn't
xmlTextThe XML representation of the node
nodeTypeNumberA numeric code that specifies the DOM type for the node

The possible values for the nodeType and their meanings are summarized in Table 5.5.

Table 5.5. Possible Values of the nodeType Property
ValueCorresponding Node Type
1ELEMENT
2ATTRIBUTE
3TEXT
4CDATA
5ENTITY REFERENCE
6ENTITY
7PI (Processing instruction)
8COMMENT
9DOCUMENT
10DOCUMENT TYPE (as found in the ...

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.