XML DOM internalSubsetPropriété
Objet DocumentType
Définition et utilisation
L'attribut internalSubset renvoie la DTD interne sous forme de chaîne (sans les crochets englobants), ou null s'il n'y en a pas.
Syntaxe
documentObject.doctype.internalSubset
Exemple
L'extrait de code suivant utiliseloadXMLDoc()met ""Charger dans xmlDoc, et affiche la DTD interne sous forme de chaîne :"
xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype.internalSubset);
document.write(xmlDoc.doctype.internalSubset);
Sortie :
<!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">
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ENTITY writer "Donald Duck.">
<!ENTITY copyright "Copyright W3Schools">
Objet DocumentTypeautres extensions