Gets a value that represents the character encoding that is specified in the declaration of an XML document.
HRESULT IHTMLDocument7::get_xmlEncoding(BSTR *p);
- A BSTR that represents the character encoding, or a NULL value if the character encoding is not specified in the declaration or the specified value is not known.
Returns one of the following values.
S_OK The operation completed successfully. W3CException_DOM_NOT_SUPPORTED_ERR The document does not support the
The following code example shows an XML declaration that specifies character encoding.<?xml encoding="UTF-8"?>