[Expat-discuss] [ANN] XSD/e 1.0.0 - embedded XML parsing, validation and C++ data binding
Boris Kolpackov
boris at codesynthesis.com
Wed Mar 21 15:12:09 CET 2007
Hi Mukesh,
"Mukesh Kumar" <Mukesh.S at mphasis.com> writes:
> I have a small question, are you trying to be an opponent to expat , I
> mean the opposite one..
I am not exactly sure what you mean by opponent, or opposite.
Expat is a general-purpose, non-validating XML parser with a
SAX-like event-driven API. When you process your XML instances
with Expat you get notified of things like "element start tag",
"attribute", "text", "element end tag", In other words, it is
a raw representation of XML and it takes some extra work before
you can actually access the data stored in XML in a natural for
your application logic way.
In contrast, XSD/e gives you an API which is specific to your
XML vocabulary and application logic. It also provides
validation and data extraction. For example, if you had a
vocabulary like this:
<person>
<name>John Does</name>
<age>31</age>
</person>
The XSD/e-generated API will notify you of the events like,
"here is name, with value 'John Does' (string)", or "here is
age with value 32(int)".
So I wouldn't say that XSD/e is an "opponent" to Expat ;-).
XSD/e does some extra work for you which may or may not be
what you want depending on the application. In fact, XSD/e
includes a customized version of Expat to perform low-level
XML parsing and well-formedness checking!
hth,
-boris
More information about the Expat-discuss
mailing list