[xsd-users] Looking for a way to disable DTD loading and Validation or provide search path instead

Boris Kolpackov boris at codesynthesis.com
Mon Jul 31 08:05:02 EDT 2023


Mustafa.Ismail at partner.bmw.de <Mustafa.Ismail at partner.bmw.de> writes:

> Was looking for a way that'd allow me to specify a DTD search path,
> just like "xml_schema::properties::schema_location" or
> "xml_schema::properties::no_namespace_schema_location". Otherwise,
> find a way to set the "fgXercesLoadExternalDTD" or
> "fgXercesSkipDTDValidation" parameters through libxsd?

libxsd doesn't wrap any DTD-related Xerces-C++ configuration parameters
so you will need to do your own XML-to-DOM parsing with one of these
parameters and then do DOM-to-C++ (there is a parsing function overload
that takes DOM instead of istream, etc).

The following FAQ entry has some sample code (you can also find it in
the multiroot example):

http://wiki.codesynthesis.com/Tree/FAQ#How_do_I_parse_an_XML_document_to_a_Xerces-C.2B.2B_DOM_document.3F



More information about the xsd-users mailing list