XML DOM entities Property
Complete DocumentType Object Reference
Definition and Usage
The entities property returns a NamedNodeMap containing both the external and
internal entities declared in the DTD.
Syntax
documentObject.doctype.entities
|
Example
The following code fragment loads "note_internal_dtd.xml"
into xmlDoc using
loadXMLDoc(), displays the node name and the node type of the
entities declared in the DTD:
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("<br />");
document.write("Nodetype: " + x.item(i).nodeType);
document.write("<br />");
}
|
Output:
Nodename: writer
Nodetype: 6
Nodename: copyright
Nodetype: 6
|
Try-It-Yourself Demos
Get the entities declared in the DTD of the XML document
Complete DocumentType Object Reference
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|