Latest web development tutorials

XML DOM entities properties

DocumentType Object Reference DocumentType objects

Definition and Usage

property returns entities containing NamedNodeMap external entities and internal entities declared in the DTD.

grammar

documentObject.doctype.entities


Examples

The following code fragment uses loadXMLDoc () to " the Books.xml " into xmlDoc, and displays the node name and node declared in the DTD entity type:

Examples

xmlDoc=loadXMLDoc("note_internal_dtd.xml");

x=xmlDoc.doctype.entities;

for (i=0;i<x.length;i++)
{
document.write("Nodename: " + x.item(i).nodeName);
document.write("
");
document.write("Nodetype: " + x.item(i).nodeType);
document.write("
");
}

Output:

Nodename: writer
Nodetype: 6
Nodename: copyright
Nodetype: 6

try it"

DocumentType Object Reference DocumentType objects