<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="dotnet" page="xmlparsing" subpage=""/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: XML Parsing in .NET</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: XML Parsing in .NET"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>XML Parsing in .NET</h1>
      <p>When you run Saxon on the .NET platform, there are two XML parsers available: the <code>System.Xml</code> 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.</p>
      <p>Saxon generally uses the Microsoft <code>System.Xml</code> parser by preference. However, you can force Saxon
to use the OpenJDK parser by calling <code>processor.SetProperty("http://saxon.sf.net/feature/preferJaxpParser", "true")</code>.
(It is not possible to do this from the command line.)</p>
      <p>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 <code>DtdValidation</code> property of the <code>DocumentBuilder</code>
class)</p>
      <p>At present, unparsed entities are ignored when the Microsoft parser is used. 
The XSLT functions <code>unparsed-entity-system-id()</code>
and <code>unparsed-entity-public-id()</code>will therefore not work.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"/>
            </td>
         </tr>
      </table>
   </body>
</html>