Easy Tutorial
❮ Met Text Substringdata Prop Element Nodetype ❯

XML DOM entities Property



Definition and Usage

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

Syntax


Example

The following code snippet uses loadXMLDoc() to load "note_internal_dtd.xml" into xmlDoc and displays the node names and node types of the entities declared in the DTD:

Example

xmlDoc=loadXMLDoc("note_internal_dtd.xml");

x=xmlDoc.doctype.entities;
for (i=0;i<x.length;i++)
{
  document.write("Node name: " + x.item(i).nodeName);
  document.write("<br>");
  document.write("Node type: " + x.item(i).nodeType);
  document.write("<br>");
}

Output:


❮ Met Text Substringdata Prop Element Nodetype ❯