XML DOM internalSubsetProperty


DocumentType Object

Definition and Usage

The internalSubset attribute returns the internal DTD as a string (without the enclosing square brackets), or null if there is none.

Syntax

documentObject.doctype.internalSubset


Example

The following code snippet usesloadXMLDoc()put "note_internal_dtd.xml"Load into xmlDoc, and output 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 "Donald Duck.">
<!ENTITY copyright "Copyright W3Schools">


DocumentType Objectother extensions