[xml] libxml2 review in windows::developer



Hi!

In the April issue of the windows::developer magazine there was
a comparative review of five (?) XML parsers, including libxml2. Author is 
Matthew Wilson. 

An online version is at 
http://www.windevnet.com/documents/s=7868/win0304a/0304a.htm,
but requires registration at the web site.

I think Matthew is a rather competent C++ guru, but this doesn't help much 
in XML issues, so there is not much beef in the article. But for benefit or 
amusement, I'll try to summarize the main points:

All testing done using C++, libxml2 used via libbxml++. The other parsers 
were MSXML, Xerces and XMLBooster. XMLBooster (www.xmlbooster.com)
is in fact a parser generator - given the class definition in a propietary 
XML-format, it generates Serializere and Deserialiers for this class.

The test data was rather 'flat', being 1000, 10000 and 100000 entries of 
the same structure:
<agenda>
 <entry year = "2003" month = "4" day = "1" who="Windows Developer 
Magazine" />
 <entry year = "2002" month = "12" day = "1" who="C/C++ User's Journal" />
 <entry year = "2001" month = "5" day = "1" who="Windows Developer 
Magazine" />
 . . .
</agenda>

So parsing this files gives only two performance classes (with little intra-
class differentation):

'fast'
MSXML-SAX
Xerces
XMLBooster

'slow' (needs 3 times the 'fast' time)
MSXML-DOM
libxml2-tree

So what's telling us these numbers:
1. Allocating the (DOM) tree needs time, and doing SAX or a specialized 
parser is faster. libxml-SAX wasn't benchmarked.
2. Xerces faster than libxml is a bit a mystery, but given the XML above, 
it may be the 'attribute cost'.

Matthew's comments on ease of use favor XMLBooster, but I find this rather 
pointless, as XMLBooster offers a layer above pure XML-Parsing, which can 
be added similiarly to each parser.

Regards,
Peter Jacobi





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]