Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] SAX/Java Character Buffers (was Re: [xml-dev] SAX andparallel processing)

From: Karl Waclawek <karl@--------.--->
To: David Megginson <david.megginson@-----.--->
Date: 1/1/2005 11:08:00 PM
David Megginson wrote:
> On Sat, 01 Jan 2005 13:29:18 -0700, Uche Ogbuji
> <Uche.Ogbuji@f...> wrote:
> 
> [about SAX/Java character events providing an offset into an array
> rather than a test/string object]
> 
> 
>>I know the original SAX idea was optimization, but I do think this is
>>exactly one of those areas where perhaps (IMO) premature optimization
>>ends up limiting design evolution, and I also think that it interferes
>>with the "Simple" part.
> 
> 
> That was a tough choice at the time.  I think it was James Clark who
> suggested it -- he is justly famous for fast code, but as anyone who
> ever tried to work with SP (his C++ SGML parsing library) can attest,
> he's not famous for readable code. 

Character events do not usually have their boundaries where
you would want to create a string object from. It makes therefore
sense even today to leave that API as designed. Just create a helper
class that accumulates characters from sussessive events and
allows you to turn them into a string when an appropriate boundary
(like an end of element tag) is reached.

Aside from that argument, let's just say that if there was no "low level"
XML API one would have to invent it.

Karl


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent