www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Phobos XML Parser

I had some trouble when first starting with phobos, because there was no XML
parser immediately available.  There were some dead projects, but that was
about it other than the D2 phobos parser.  I wrote my own parser available
here: https://the.narro.ws/svn/opticron/branches/kxml  It is based on the Yage
parser, but the internal parsing routine has been completely rewritten from
scratch to be a string parser instead of a stream parser and I've added a lot
otherwise.  There is a good bit of room for improvement, but even as it
stands, it should be approximately double the performance of the D2 phobos
parser if not more.  It currently supports parsing of unparsed CData nodes
(<![CDATA[...]]>) and xml processing elements, and ignores other elements it
doesn't understand.  The attribute parsing is ugly, but it works.  I'll redo
it at some point.

Let me know what you think!  I'm always open to comments/suggestions/criticism.
https://the.narro.ws/svn/opticron/branches/kxml
Jun 04 2008