THE WORLD'S LARGEST WEB DEVELOPER SITE

DOM Document xmlVersion Property

Document Object Reference Document Object

The following code fragment uses the xml file: "books.xml".

Example

Return the XMl version of the XML document:

xmlDoc.xmlVersion;

The result will be:

1.0

Try it yourself »

Definition and Usage

The xmlVersion property sets and returns the xml version of the XML document.

This property is intended for XML documents, and wil not work properly for HTML documents.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The xmlVersion property is only supported in Firefox, Chrome, and Safari.


Syntax

Set the xmlVersion

XMLdocument.xmlVersion=versionNumber

Return the xmlVersion

XMLdocument.xmlVersion

Technical Details

Return Value: A String, representing the XML document's xml version
DOM Version Core Level 3

Document Object Reference Document Object


COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: