[xsd-users] parsing without xsd file

Boris Kolpackov boris at codesynthesis.com
Tue Oct 31 13:29:16 EST 2006


Hi Debora,

Debora Vanni <debora.vanni at tvblob.com> writes:

> I thought that since I generate the code from xsd it wasn't necessary to
> pass the xsd again. I saw that XSD generated a private function "parse"
> that doesn't need xsd file but it is used only in one of the constructor
> of the type (hello_type in the simple example).
> What I need to do is:
> generate code from xsd(OK)
> parse an xml message(with no schema location) without loading the xsd
> file.
> Is there a way to do this with XSD?

You can disable validation in the underlying XML parser (and thus loading
of the .xsd file) by passing the xml_schema::flags::dont_validate flag
to one of the parsing functions. You may also be interested in related
questions that are discussed in Section 2, "Validation and Parsing" of
the C++/Tree Mapping FAQ:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/faq/


HTH,
-Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061031/f474309c/attachment.pgp


More information about the xsd-users mailing list