Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Encoding

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Nils_Kilden-Pedersen AT Countrywide.Com, xom-interest AT lists.ibiblio.org
  • Cc:
  • Subject: Re: [XOM-interest] Encoding
  • Date: Thu, 4 Sep 2003 10:22:32 -0400

At 11:17 AM -0700 7/29/03, Nils_Kilden-Pedersen AT Countrywide.Com wrote:
Is there a way to get the encoding of a built document or to somehow read
the XML declaration? If not, either would be useful.
My use case is: writing a document back in the same encoding it was read.


I understand the use case, but right now that's still on the other side of 80/20 for me. First of all, it's extremely tricky because documents can have both the encoding specified in the XML declaration and the one actually used, and these are not necessarily the same thing. Plus parsers don't reliably report either. And it doesn't really affect the document's content in any way. I'm trying to keep semantically insignificant information such as encoding out of XOM.
--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page