forked from mdn/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
38 lines (27 loc) · 1.47 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: Document.xmlEncoding
slug: Web/API/Document/xmlEncoding
tags:
- API
- DOM
- Document.xmlEncoding
- MakeBrowserAgnostic
- Property
- Deprecated
browser-compat: api.Document.xmlEncoding
---
<p>{{APIRef("DOM")}}{{deprecated_header}}</p>
<p>Returns the encoding as determined by the XML declaration. Should be <code>null</code> if unspecified or unknown.</p>
<div class="warning"><p><strong>Warning:</strong> Do not use this attribute; it has been removed from the DOM Level 4 specification and is no longer supported in Gecko 10.0 {{ geckoRelease("10.0") }}.</p></div>
<p>If the XML Declaration states:</p>
<pre><?xml version="1.0" encoding="UTF-16"?>
</pre>
<p>...the result should be "UTF-16".</p>
<p>However, Firefox 3.0 includes information on endianness (e.g., UTF-16BE for big endian encoding), and while this extra information is removed as of Firefox 3.1b3, Firefox 3.1b3 is still consulting the file's encoding, rather than the XML Declaration as the spec defines it ("An attribute specifying, <em>as part of the XML declaration</em>, the encoding of this document.").</p>
<h2 id="Specifications">Specifications</h2>
<ul>
<li><a href="https://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-encoding">http://www.w3.org/TR/DOM-Level-3-Cor...ment3-encoding</a></li>
<li>This has been removed from {{ spec("http://www.w3.org/TR/domcore/","DOM Core Level 4","WD") }}</li>
</ul>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{Compat}}</p>