Latest web development tutorials

XML DOM internalSubset property

DocumentType Object Reference DocumentType objects

Definition and Usage

internalSubset property returned as a string of internal DTD (no delimiting brackets), if not then return null.

grammar

documentObject.doctype.internalSubset


Examples

The following code fragment uses loadXMLDoc () to " the Books.xml " into xmlDoc, and a string of internal DTD:

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 Object Reference DocumentType objects