OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SAX InputSource and character streams

Quick and hopefully obvious question re: SAX.. 
and sorry for the lightweight content ;)

When constructing a SAX InputSource from a character stream
(java.io.Reader), is it correct to assume that any encoding
declaration given in the document will be ignored?

That is, should I worry about anything blowing up if I parse
an InputSource constructed like this:

new InputSource(
  new StringReader( "<?xml version=\"1.0\" encoding=\"foo\"?><bar/>" )

...where foo is pretty much anything (an actual encoding supported by the
system, or not) ? The encoding should be irrelevant at that point, yes?


   - Mike
Mike J. Brown, software engineer at            My XML/XSL resources: 
webb.net in Denver, Colorado, USA              http://skew.org/xml/