xmlEncoding
Summary
Gets a value that represents the character encoding that is specified in the declaration of an XML document.
Property of dom/Documentdom/Document
Syntax
Note: This property is read-only.
var encoding = document.xmlEncoding;
Return Value
Returns an object of type StringString
The encoding name that is specified in the declaration of an XML document.
Examples
The following code example shows an XML declaration that specifies character encoding.
<?xml encoding="UTF-8"?>
Related specifications
- DOM Level 3 Core
- Recommendation
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]