[Mono-list] XmlTextReader class problem

Atsushi Eno atsushi at ximian.com
Fri Dec 9 06:04:48 EST 2005


mirek novak wrote:
> Hello everybody,
> does anyone here know how to obtain information about encoding of XML
> file? Especially using xmlTextReader. There is undocumented property
> Encoding which should point to actual document encoding, but in mono
> implementation is unused, which i don't understand! I think, that
> without knowledge of XML encoding its not possible to parse/validate
> document, so why is this information inaccessible?

Well, I have to say, many types and members are missing
documentation now. It is one unfortunate case. You can just use
XmlTextReader.Encoding as usual public property.

Missing members can be easily filled using "monodocer". I'll fill
missing bits up later. (XmlTextReader.Encoding is not in ECMA
specification, thus it was not included in the imported document).

XML processors can auto-detect the document encoding (as long as
it is marked up correctly ;-) by nature. See

Atsushi Eno

More information about the Mono-list mailing list