ホーム HTML CSS XML JAVASCRIPT   PHP SQL MORE...   リファレンス 事例集    

XML DOM xmlStandalone プロパティ


Document オブジェクト Reference Document オブジェクト

定義と用法

xmlStandalone プロパティは、文書が standalone かどうかを設定するか返します。

構文

documentObject.xmlStandalone


次のコードは、loadXMLDoc() を使用して xmlDoc に "books.xml" をロードし、 文書の XML エンコード、standalone 属性、および XML バージョンを表示します:

xmlDoc=loadXMLDoc("books.xml");

document.write("XML encoding: " + xmlDoc.xmlEncoding);
document.write("<br />");
document.write("XML standalone: " + xmlDoc.xmlStandalone);
document.write("<br />");
document.write("XML version: " + xmlDoc.xmlVersion);
document.write("<br />");
document.write("Encoding when parsing: " + xmlDoc.inputEncoding);

出力:

XML encoding: ISO-8859-1
XML standalone: false
XML version: 1.0
Encoding when parsing: ISO-8859-1

試してください »

Document オブジェクト Reference Document オブジェクト