On Tuesday, 5 May 2015 at 12:10:59 UTC, Jacob Carlborg wrote:
Yes, of course it's slower. The DOM parser creates a DOM as well, which the pull parser doesn't.

These other libraries, what kind of parsers are those using? I mean, it's not fair to compare a pull parser against a DOM parser.

I agree. Most applications will use a DOM parser for convenience, so sacrificing some speed initially in favour of easy-of-use makes a lot of sense. As long as it is possible to improve it later (e.g. use SIMD scanning to find the end of CDATA etc).

In my opinion it is rather difficult to build a good API without also using the API in an application in parallel. So it would be a good strategy to build a specific DOM along with writing the XML infrastructure, like SVG/HTML.

Also, some parsers, like RapidXML only support a subset of XML. So they cannot be used for comparisons.

Reply via email to