jesuswon7 wrote:
>I'm reading lots of benchmark results that shows that XmlPull is
>faster than SAX2?
>
which benchmark? dont you know that all benchmarks lie :-) nonetheless
you can look on Piccolo as example of very fast SAX2 parser.
IMHO best benchmark is to chose representative part of your program and
try it with different parsers and APIs so you know how it works for
_your_ code and how easy is to read and maintain your code (in other
worlds how close XML parser API matches your cognitive model for dealing
with XML ...)
> However the results do not explain the reasons.
>1)Does anyone know why?
>
all depends on parser implementation.
>2) Both XmlPull and SAX2 are event-based parser and the only
>difference is the control of the parsing. Is this statement valid?
>
i would say so - there is not inherent difference between SAX and
XmlPull maybe except that XmlPull is lower level than SAX (as pull
parsing is closes to XML tokenization) and it is easy to convert pull
parsing (XmlPull) to push parsing (SAX) but opposite conversion that
_preserves_ streaming is harder and requires extra thread or buffering
(if push parser supports chunk parsing such as Xerces XNI but not just SAX).
hope that addresses your question.
thanks,
alek
--
"Mr. Pauli, we in the back are all agreed that your theory is crazy.
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for
Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/uetFAA/2U_rlB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
xmlpull-dev-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|