You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Agrawal, Vikas (ELS)" <V....@elsevier.co.uk> on 2003/09/04 11:23:39 UTC

which parser shall I use?

Hi All,

As we can see there are five parsers available in the 2.2.0 release.
i.e.
1) DOMBuilder
2) XercesDOMParser
3) SAX2XMLReader
4) SAXParser
5) deprecated DOMParser

Which parser should I use? Which parser is fastest?
Any suggestion and recomendation would be appreciated.

Thanks & Regards
Vikas Agrawal


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: which parser shall I use?

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,

> 1) DOMBuilder

The DOM Level 3 parser. This may, amongst other things, change name before 
it gets to Candidate Recomendation. On the other hand, it will be the 
standards complient way to go. Its what I use internally.

> 2) XercesDOMParser

This is the way we parsed before DOM specified how we should. This is 
stable and widly used.


> 3) SAX2XMLReader

This is for SAX2.

> 4) SAXParser

This is for SAX1.


> 5) deprecated DOMParser
Don't use this.

> 
> Which parser should I use? Which parser is fastest?

If you don't need to build a full DOM Tree then SAX will be much faster 
(but you will have to specify what happens in each of the handlers - see 
the samples). If you do then either XercesDOMParser or DOMBuilder 
depending on the level of stability you require.



Gareth


-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org