XML DOM internalSubset 属性
DocumentType 对象
定义和用法
internalSubset 属性以字符串形式返回内部 DTD(无定界方括号),如果没有则返回 null。
语法
documentObject.doctype.internalSubset
实例
xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype.internalSubset);
document.write(xmlDoc.doctype.internalSubset);
输出:
<!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">
DocumentType 对象其他扩展