encoding
The declared encoding for the document. Unlike general parsing, this value is accessible after reading the document element. The document element must be the first non-whitespace element. The value for this property before document element presence is known is implementation defined (and may change).