From: Elliotte Harold <elharo@me...> - 2004-04-25 19:13:59
XML places no fundamental limit on the sizes of things. In particular it
is legal and well-formed to have multigabayte:
1. Element names
2. Attribute values
3. Processing instruction data
In practice, processing instruction data is where I expect problems to
arise first, though attribute values are also possible. SAX uses pure
strings for all these constructs and a few others, and Java strings are
limited to a maximum of 2.1 gigachars.
SAX currently says nothing about what to do when these boundaries are
exceeded. This needs to be rectified. Options I see are
2. Throw a SAXException
3. Throw a different exception.
I suggest 2, throw a SAXException. We wil simply say SAX cannot handle
such extreme documents. If this becomes a more practical limit, then we
can revisit possible solutions in the future.
Elliotte Rusty Harold
Get latest updates about Open Source Projects, Conferences and News.