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]

Re: SAX and the characters function



Thanks all, for the answers!

Some serious digging later... I found some very early comments about this
issue (Mainly between Tim Bray and Dave Megginson)

http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Dec-1997/0184.html
http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Dec-1997/0188.html
http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Dec-1997/0190.html

[[a snippet of 0190...

> > > data(XmlParser, String)=20
> > I feel that the 2nd argument should not be a String. It is a recipe
> > for disastrous inefficiency if the processor has to cook up a=20
> > java.lang.String object for every little chunk of text. =20
>
>The overhead isn't that bad with =C6lfred because I coalesce my data
>into the largest chunks possible before allocating the String. I
>think that returning a char[] array would be confusing for users
that's a fair point; the correct solution per design principles
is to have a Text class that could give you a String if you
asked it; since many applications will ignore the comment of many
elements, it seems vital not to have an interface that makes
lazy evaluation impossible. So I think you have to go for either
the char[] trick or another class.
]]

That's the best I could find for now but it should do.  I also got some
great offlist answers.  Thanks for the direction in where to start looking
Dave... Hard to believe that SAX is coming up on 4 years old at the end of
this year...

Jeff Rafter
Defined Systems
http://www.defined.net
XML Development and Developer Web Hosting