SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Notices
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
XPath API for Java
Saxon on .NET
| Introduction
| Saxon API for .NET
» | XML Parsing in .NET
Extensibility
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# XML Parsing in .NET

When you run Saxon on the .NET platform, there are two XML parsers available: the `System.Xml` parser supplied with the .NET platform, and the JAXP parser that comes with the OpenJDK library, which is supplied as part of the Saxon product.

Saxon generally uses the Microsoft `System.Xml` parser by preference. However, you can force Saxon to use the OpenJDK parser by calling `processor.SetProperty("http://saxon.sf.net/feature/preferJaxpParser", "true")`. (It is not possible to do this from the command line.)

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 `DocumentBuilder` class)

At present, unparsed entities are ignored when the Microsoft parser is used. The XSLT functions `unparsed-entity-system-id()` and `unparsed-entity-public-id()`will therefore not work.