XML DOM internalSubset Property
Definition and Usage
The internalSubset property can return the internal DTD as a string (without delimiters), or null if there is none.
Syntax:
documentObject.doctype.internalSubset
Instance
In all examples, we will use XML files note_internal_dtd.xml, and the JavaScript function loadXMLDoc().
The following code snippet can display the internal DTD as a string:
xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype.internalSubset
);
Output:
<!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> <!ENTITY writer "Bill Gates"> <!ENTITY copyright "Copyright codew3c.com">