std.xml2 candidate

Eric Desbiens olace.mail at gmail.com
Sun Dec 12 10:04:00 PST 2010


Hello,

It's great to see interest in replacing std.xml. I am also working on a
replacement for std.xml, maybe we can collaborate on this and not duplicate
effort. We should choose one of our codebase and develop from there a strong
alternative.

I propose my codebase for the following 2 reasons:

1.It performs better and scale better with file size. Here's a quick benchmark for
dom parsing on my computer. I don't know how well it's performed compare to Tango.

=== XMLP ===
XMLP 1Mb  Parsing time: 0.548 s
XMLP 11Mb Parsing time: 29.570
=== My Alternative* ===
Alt 1Mb  Parsing time: 0.134 s
Alt 11Mb Parsing time: 1.225 s

*This is using XMl1.1 compliant parser.

2. It is more flexible
All parsers are templated and you can choose the degree of conformance, if
namespace are used, the type of entity decoding and support parsing document
fragment. It also parse any type of range wich the element type is some sort of
character.

Your library is more complete tough. It support a Sax like interface, have a
validating parser and try to be compatible with std.xml (which I'm not sure is
needed). It also normalize attribute, which mine does not. On compliance, I think
the 2 libraries are on the same level.

Feel free to talk about your code and show where it is better than mine and if you
think it should be better to build on your code instead of mine. Probably a mix of
both library will make a better base. I think that if we collaborate on this, we
will make a great library.

Code can be downloaded from : https://github.com/olace/experimental

check exp/xml.d


More information about the Digitalmars-d-announce mailing list