[Home] [By Thread] [By Date] [Recent Entries]

  • From: Mike Brown <mike@s...>
  • To: xml-dev@l...
  • Date: Mon, 19 Feb 2001 10:26:56 -0700 (MST)

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?

TIA,

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

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member