XML DOM doctypeプロパティ
Document オブジェクト
定義と用法
doctype プロパティは、ドキュメントに関連する文書型宣言(DTD、正式名称は Document Type Declaration)を返します。
DTD を持たない XML ドキュメントの場合は null を返します。
このプロパティは、DocumentType オブジェクト(Document の子ノード)への直接アクセスを提供します。
構文
documentObject.doctype
例
以下のコードスニペットはloadXMLDoc()"" を xmlDoc に読み込み、DocumentType オブジェクトを返します:
例
xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype);
document.write(xmlDoc.doctype);
出力:
[object DocumentType]
試してみる »
Document オブジェクト その他の拡張