Latest web development tutorials

XML DOM xmlStandalone property

Document Object Reference Document Object

Definition and Usage

xmlStandalone property sets or returns whether the document is standalone.

grammar

documentObject.xmlStandalone


Examples

The following code fragment uses loadXMLDoc () to " the Books.xml " into xmlDoc, and displays the XML version of the XML encoding, standalone attribute and document:

Examples

xmlDoc=loadXMLDoc("books.xml");

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

Output:

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

try it"

Document Object Reference Document Object