XML Parsing in .NET
When you run Saxon on the .NET platform, there are two XML parsers available: the
supplied with the .NET platform, and the Xerces Apache parser, which is supplied
as part of the Saxon product.
Saxon generally uses the Xerces parser by preference. However, you can force Saxon
to use the OpenJDK parser by calling
Or from the command line, set the option
Note that the Microsoft parser does not notify ID or IDREF values from the DTD, or expand attributes with
fixed or default values, unless DTD validation is requested. This can be requested using the
-v option on the
command line, or via the API. (See the
DtdValidation property of the
Support for OASIS catalogs is provided at the command line level by means of the command line option
-catalog:filename. To enable this to work, the Apache catalog resolver is integrated in the Saxon DLL.
This works only with the JAXP (Xerces) parser.
To use catalogs when running an application using the Saxon API, the interface is not quite so convenient.
Call the static method
net.sf.saxon.trans.XmlCatalogResolver.setCatalog() (found in
with three arguments: the filename of the catalog file, the Saxon Configuration object,
and a boolean indicating whether tracing is required.