[xsd-users] Driver for creating a sample XML file.

Boris Kolpackov boris at codesynthesis.com
Tue Oct 30 15:08:22 EDT 2007


Hi Shiva,

Balasubramanyam, Shivakumar <sbalasub at qualcomm.com> writes:

> Does code synthesis create sample xml files for the code generated
> from XSD?

No, there is no such feature. Though we are thinking about adding this
functionality to the compiler.


> I also would like to know if there is a utility tool, that will take
> a XSD and XML and validate the document as well?

Xerces-C++ includes a number of examples that can be used for that,
e.g. SAXCount. These examples support a number of option that allow
you to customize the validation parameters. A typical use case for
validation would be:

SAXCount -v=always -n -s -f text.xml


Also note that the schema should be specified via schemaLocation or
noNamespaceSchemaLocation in the XML document. It cannot be provided
on the command line (though it won't be very difficult to create a
tool that accepts the schema as a separate file).

Boris




More information about the xsd-users mailing list