当前位置: 首页 > 网络学院 > XML相关教程 > XML DOM > internalSubset 属性

XML DOM
DOM Attribute
DOM Text
DOM CDATA
DOM Comment
DOM HttpRequest
DOM ParseError
DOM 校验器
DOM 介绍
DOM 摘要
DOM 案例
DOM 节点树
DOM 访问节点树
DOM 节点信息
DOM 文档执行
DOM 节点导航

XML DOM 中的 internalSubset 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 293 ::
收藏到网摘: n/a

Definition and Usage
定义和用法

The internalSubset property returns the internal DTD as a string (without the delimiting square brackets), or null if there is none.
internalSubset属性的作用是:以字符串的形式返回内部DTD(不包含“括号”);或者,如果内部DTD不存在将返回空值。

Syntax
语法

documentObject.doctype.internalSubset


In all examples, we will use the XML file note_internal_dtd.xml, and the JavaScript function loadXMLDoc().
在所有案例中,我们将使用“note_internal_dtd.xml”文件以及JavaScript 函数“loadXMLDoc()”。

Example
案例

The following code fragment displays the internal DTD as a string:
下面的代码片断将以一个字符串的形式显示内部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">

评论 (0) All

登陆 | 还没注册?