[xsd-users] Re: Pugixml

Boris Kolpackov boris at codesynthesis.com
Wed Jan 9 09:35:51 EST 2013


Hi Wesley,

Wesley Peters <Wesley.Peters at tachyon.com> writes:

> Have you ever considered extending XSD to be able to use pugixml as 
> the underlying xml implementation?  We have used pugixml for a couple
> of projects here, and it seems to have a fair amount of capability and
> is super fast. For anyone who doesn't need a validating engine, pugixml
> is worth considering, and it would make a great addition to XSD.

I get such questions from time to time so I've CC'ed xsd-users to my
reply. 

The short answer to your question is no, there are no plans.

The long answer is two-part:

1. XSD (C++/Tree, really) derives a lot of its power and flexibility
   from tight integration with Xerces-C++. Things like DOM association,
   DOM pre/post-processing (i.e., "fixing up" broken XML to make it
   conform to the schema), etc. So while the parser you suggested
   also seem to provide some kind of a DOM API, it will be a
   challange to support switching API from Xerces-C++ ro pugixml.

2. A lot of the new "super fast" XML parsers out there are not real
   XML parsers, that is, they don't conform to the XML 1.0 spec. See
   this blog post I wrote on the subject:

   http://www.codesynthesis.com/~boris/blog/2008/05/19/real-xml-parser/

   While I haven't tested pugixml (there seems to be a new one every
   couple of months), I am pretty certain it is non-conforming.

   While you may say that its level of XML support is sufficient for
   your needs, keep in mind that XSD is a general-purpose tool used
   by many people in different scenarios. We don't want to end up
   explaining why XSD cannot handle perfectly valid XML over and
   over again.

Plus, if you are looking for a smaller/faster equivalent to the
XSD+Xerces-C++ combo, take a look at XSD/e:

http://www.codesynthesis.com/products/xsde/

Inside it uses Expat as the XML parser, which is one of the fastest
(if not the fastest) *fully conforming* XML 1.0 parser.

Boris



More information about the xsd-users mailing list