blob: 694856f7814eb9204404444dae18c22efc98a8ae [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Interface IXMLReader
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface IXMLReader
| Apache Lucene.NET 4.8.0-beta00010 Documentation ">
<meta name="generator" content="docfx 2.56.0.0">
<link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="benchmark/toc.html">
<meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search">
<ul class="level0 breadcrumb">
<li>
<a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a>
<span id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</span>
</li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Sax.IXMLReader">
<h1 id="Sax_IXMLReader" data-uid="Sax.IXMLReader" class="text-break">Interface IXMLReader
</h1>
<div class="markdown level0 summary"><p>Interface for an XML filter.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="Sax.html">Sax</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.Benchmark.dll</h6>
<h5 id="Sax_IXMLReader_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface IXMLReader</code></pre>
</div>
<h5 id="Sax_IXMLReader_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p><em>This module, both source code and documentation, is in the
Public Domain, and comes with<strong> NO WARRANTY</strong>.</em>
See<a href="http://www.saxproject.org">http://www.saxproject.org</a>
for further information.
<p>
An XML filter is like an XML reader, except that it obtains its
events from another XML reader rather than a primary source like
an XML document or database.Filters can modify a stream of
events as they pass on to the final application.
<p>
The <a class="xref" href="Sax.IXMLFilter.html">IXMLFilter</a> helper class provides a convenient base
for creating SAX2 filters, by passing on all <a class="xref" href="Sax.IEntityResolver.html">IEntityResolver</a>,
<a class="xref" href="Sax.IDTDHandler.html">IDTDHandler</a>,
<a class="xref" href="Sax.IContentHandler.html">IContentHandler</a> and <a class="xref" href="Sax.IErrorHandler.html">IErrorHandler</a>
events automatically.</p>
</div>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_ContentHandler.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.ContentHandler%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L218">View Source</a>
</span>
<a id="Sax_IXMLReader_ContentHandler_" data-uid="Sax.IXMLReader.ContentHandler*"></a>
<h4 id="Sax_IXMLReader_ContentHandler" data-uid="Sax.IXMLReader.ContentHandler">ContentHandler</h4>
<div class="markdown level1 summary"><p>Gets or Sets a content event handler.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IContentHandler ContentHandler { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.IContentHandler.html">IContentHandler</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_ContentHandler_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p><p>If the application does not register a content handler, all
content events reported by the SAX parser will be silently
ignored.
<p>Applications may register a new or different handler in the
middle of a parse, and the SAX parser must begin using the new
handler immediately.</p>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_DTDHandler.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.DTDHandler%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L205">View Source</a>
</span>
<a id="Sax_IXMLReader_DTDHandler_" data-uid="Sax.IXMLReader.DTDHandler*"></a>
<h4 id="Sax_IXMLReader_DTDHandler" data-uid="Sax.IXMLReader.DTDHandler">DTDHandler</h4>
<div class="markdown level1 summary"><p>Gets or Sets a DTD event handler.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IDTDHandler DTDHandler { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.IDTDHandler.html">IDTDHandler</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_DTDHandler_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the application does not register a DTD handler, all DTD
events reported by the SAX parser will be silently ignored.
<p>
Applications may register a new or different handler in the
middle of a parse, and the SAX parser must begin using the new
handler immediately.</p>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_EntityResolver.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.EntityResolver%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L192">View Source</a>
</span>
<a id="Sax_IXMLReader_EntityResolver_" data-uid="Sax.IXMLReader.EntityResolver*"></a>
<h4 id="Sax_IXMLReader_EntityResolver" data-uid="Sax.IXMLReader.EntityResolver">EntityResolver</h4>
<div class="markdown level1 summary"><p>Gets or Sets an entity resolver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IEntityResolver EntityResolver { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.IEntityResolver.html">IEntityResolver</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_EntityResolver_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the application does not register an entity resolver,
the <a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> will perform its own default resolution.
<p>
Applications may register a new or different resolver in the
middle of a parse, and the SAX parser must begin using the new
resolver immediately.</p>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_ErrorHandler.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.ErrorHandler%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L235">View Source</a>
</span>
<a id="Sax_IXMLReader_ErrorHandler_" data-uid="Sax.IXMLReader.ErrorHandler*"></a>
<h4 id="Sax_IXMLReader_ErrorHandler" data-uid="Sax.IXMLReader.ErrorHandler">ErrorHandler</h4>
<div class="markdown level1 summary"><p>Gets or Sets an error event handler.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IErrorHandler ErrorHandler { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.IErrorHandler.html">IErrorHandler</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_ErrorHandler_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the application does not register an error handler, all
error events reported by the SAX parser will be silently
ignored; however, normal processing may not continue. It is
highly recommended that all SAX applications implement an
error handler to avoid unexpected bugs.
<p>
Applications may register a new or different handler in the
middle of a parse, and the SAX parser must begin using the new
handler immediately.</p>
</div>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_GetFeature_System_String_.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.GetFeature(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L91">View Source</a>
</span>
<a id="Sax_IXMLReader_GetFeature_" data-uid="Sax.IXMLReader.GetFeature*"></a>
<h4 id="Sax_IXMLReader_GetFeature_System_String_" data-uid="Sax.IXMLReader.GetFeature(System.String)">GetFeature(String)</h4>
<div class="markdown level1 summary"><p>Look up the value of a feature flag.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool GetFeature(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The feature name, which is a fully-qualified URI.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>The current value of the feature (true or false).</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_GetFeature_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The feature name is any fully-qualified URI. It is
possible for an XMLReader to recognize a feature name but
temporarily be unable to return its value.
Some feature values may be available only in specific
contexts, such as before, during, or after a parse.
Also, some feature values may not be programmatically accessible.
(In the case of an adapter for SAX1 {@link Parser}, there is no
implementation-independent way to expose whether the underlying
parser is performing validation, expanding external entities,
and so forth.)
<p>All XMLReaders are required to recognize the
<a href="http://xml.org/sax/features/namespaces">http://xml.org/sax/features/namespaces</a> and the
<a href="http://xml.org/sax/features/namespace-prefixes">http://xml.org/sax/features/namespace-prefixes</a> feature names.
<p>Typical usage is something like this:</p>
<pre><code>XMLReader r = new MySAXDriver();
// try to activate validation
try {
r.SetFeature(&quot;http://xml.org/sax/features/validation&quot;, true);
} catch (SAXException e) {
Console.Error.WriteLine(&quot;Cannot activate validation.&quot;);
}
// register event handlers
r.ContentHandler = new MyContentHandler();
r.ErrorHandler = new MyErrorHandler();
// parse the first document
try {
r.Parse(&quot;http://www.foo.com/mydoc.xml&quot;);
} catch (IOException e) {
Console.Error.WriteLine(&quot;I/O exception reading XML document&quot;);
} catch (SAXException e) {
Console.Error.WriteLine(&quot;XML exception reading document.&quot;);
}</code></pre>
<p><p>Implementors are free (and encouraged) to invent their own features,
using names built on their own URIs.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXNotRecognizedException.html">SAXNotRecognizedException</a></td>
<td><p>If the feature
value can&apos;t be assigned or retrieved.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="Sax.SAXNotSupportedException.html">SAXNotSupportedException</a></td>
<td><p>When the
<a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> recognizes the feature name but
cannot determine its value at this time.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_GetFeature_System_String__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_SetFeature_System_String_System_Boolean_">SetFeature(String, Boolean)</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_GetProperty_System_String_.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.GetProperty(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L144">View Source</a>
</span>
<a id="Sax_IXMLReader_GetProperty_" data-uid="Sax.IXMLReader.GetProperty*"></a>
<h4 id="Sax_IXMLReader_GetProperty_System_String_" data-uid="Sax.IXMLReader.GetProperty(System.String)">GetProperty(String)</h4>
<div class="markdown level1 summary"><p>Look up the value of a property.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">object GetProperty(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The property name, which is a fully-qualified URI.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><p>The current value of the property.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_GetProperty_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The property name is any fully-qualified URI. It is
possible for an XMLReader to recognize a property name but
temporarily be unable to return its value.
Some property values may be available only in specific
contexts, such as before, during, or after a parse.
<p>
<a class="xref" href="Sax.IXMLReader.html">IXMLReader</a>s are not required to recognize any specific
property names, though an initial core set is documented for
SAX2.
<p>
Implementors are free (and encouraged) to invent their own properties,
using names built on their own URIs.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXNotRecognizedException.html">SAXNotRecognizedException</a></td>
<td><p>If the property
value can&apos;t be assigned or retrieved.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="Sax.SAXNotSupportedException.html">SAXNotSupportedException</a></td>
<td><p>When the
<a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> recognizes the property name but
cannot determine its value at this time.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_GetProperty_System_String__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_SetProperty_System_String_System_Object_">SetProperty(String, Object)</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_Parse_Sax_InputSource_.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.Parse(Sax.InputSource)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L283">View Source</a>
</span>
<a id="Sax_IXMLReader_Parse_" data-uid="Sax.IXMLReader.Parse*"></a>
<h4 id="Sax_IXMLReader_Parse_Sax_InputSource_" data-uid="Sax.IXMLReader.Parse(Sax.InputSource)">Parse(InputSource)</h4>
<div class="markdown level1 summary"><p>Parse an XML document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Parse(InputSource input)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.InputSource.html">InputSource</a></td>
<td><span class="parametername">input</span></td>
<td><p>The input source for the top-level of the
XML document.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_Parse_Sax_InputSource__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The application can use this method to instruct the XML
reader to begin parsing an XML document from any valid input
source (a character stream, a byte stream, or a URI).
<p>
Applications may not invoke this method while a parse is in
progress (they should create a new XMLReader instead for each
nested XML document). Once a parse is complete, an
application may reuse the same XMLReader object, possibly with a
different input source.
Configuration of the <a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> object (such as handler bindings and
values established for feature flags and properties) is unchanged
by completion of a parse, unless the definition of that aspect of
the configuration explicitly specifies other behavior.
(For example, feature flags or properties exposing
characteristics of the document being parsed.)
<p>
During the parse, the XMLReader will provide information
about the XML document through the registered event
handlers.
<p>
This method is synchronous: it will not return until parsing
has ended. If a client application wants to terminate
parsing early, it should throw an exception.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXException.html">SAXException</a></td>
<td><p>Any SAX exception, possibly
wrapping another exception.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.IO.IOException</span></td>
<td><p>An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_Parse_Sax_InputSource__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.InputSource.html">InputSource</a></div>
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_Parse_System_String_">Parse(String)</a></div>
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_EntityResolver">EntityResolver</a></div>
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_DTDHandler">DTDHandler</a></div>
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_ContentHandler">ContentHandler</a></div>
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_ErrorHandler">ErrorHandler</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_Parse_System_String_.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.Parse(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L305">View Source</a>
</span>
<a id="Sax_IXMLReader_Parse_" data-uid="Sax.IXMLReader.Parse*"></a>
<h4 id="Sax_IXMLReader_Parse_System_String_" data-uid="Sax.IXMLReader.Parse(System.String)">Parse(String)</h4>
<div class="markdown level1 summary"><p>Parse an XML document from a system identifier (URI).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Parse(string systemId)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">systemId</span></td>
<td><p>The system identifier (URI).</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_Parse_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is a shortcut for the common case of reading a
document from a system identifier. It is the exact
equivalent of the following:</p>
<pre><code>Parse(new InputSource(systemId));</code></pre>
<p><p>If the system identifier is a URL, it must be fully resolved
by the application before it is passed to the parser.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXException.html">SAXException</a></td>
<td><p>Any SAX exception, possibly
wrapping another exception.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.IO.IOException</span></td>
<td><p>An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_SetFeature_System_String_System_Boolean_.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.SetFeature(System.String%2CSystem.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L116">View Source</a>
</span>
<a id="Sax_IXMLReader_SetFeature_" data-uid="Sax.IXMLReader.SetFeature*"></a>
<h4 id="Sax_IXMLReader_SetFeature_System_String_System_Boolean_" data-uid="Sax.IXMLReader.SetFeature(System.String,System.Boolean)">SetFeature(String, Boolean)</h4>
<div class="markdown level1 summary"><p>Set the value of a feature flag.
<p>
The feature name is any fully-qualified URI. It is
possible for an XMLReader to expose a feature value but
to be unable to change the current value.
Some feature values may be immutable or mutable only
in specific contexts, such as before, during, or after
a parse.
<p>
All XMLReaders are required to support setting
<a href="http://xml.org/sax/features/namespaces">http://xml.org/sax/features/namespaces</a> to true and
<a href="http://xml.org/sax/features/namespace-prefixes">http://xml.org/sax/features/namespace-prefixes</a> to false.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void SetFeature(string name, bool value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The feature name, which is a fully-qualified URI.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">value</span></td>
<td><p>The requested value of the feature (true or false).</p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXNotRecognizedException.html">SAXNotRecognizedException</a></td>
<td><p>If the feature
value can&apos;t be assigned or retrieved.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="Sax.SAXNotSupportedException.html">SAXNotSupportedException</a></td>
<td><p>When the
<a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> recognizes the feature name but
cannot set the requested value.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_SetFeature_System_String_System_Boolean__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_GetFeature_System_String_">GetFeature(String)</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader_SetProperty_System_String_System_Object_.md&amp;value=---%0Auid%3A%20Sax.IXMLReader.SetProperty(System.String%2CSystem.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L172">View Source</a>
</span>
<a id="Sax_IXMLReader_SetProperty_" data-uid="Sax.IXMLReader.SetProperty*"></a>
<h4 id="Sax_IXMLReader_SetProperty_System_String_System_Object_" data-uid="Sax.IXMLReader.SetProperty(System.String,System.Object)">SetProperty(String, Object)</h4>
<div class="markdown level1 summary"><p>Set the value of a property.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void SetProperty(string name, object value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The property name, which is a fully-qualified URI.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">value</span></td>
<td><p>The requested value for the property.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_IXMLReader_SetProperty_System_String_System_Object__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The property name is any fully-qualified URI. It is
possible for an <a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> to recognize a property name but
to be unable to change the current value.
Some property values may be immutable or mutable only
in specific contexts, such as before, during, or after
a parse.
<p>
<a class="xref" href="Sax.IXMLReader.html">IXMLReader</a>s are not required to recognize setting
any specific property names, though a core set is defined by
SAX2.
<p>
This method is also the standard mechanism for setting
extended handlers.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXNotRecognizedException.html">SAXNotRecognizedException</a></td>
<td><p>If the property
value can&apos;t be assigned or retrieved.</p>
</td>
</tr>
<tr>
<td><a class="xref" href="Sax.SAXNotSupportedException.html">SAXNotSupportedException</a></td>
<td><p>When the
<a class="xref" href="Sax.IXMLReader.html">IXMLReader</a> recognizes the property name but
cannot set the requested value.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="seealso">See Also</h3>
<div class="seealso">
<div><a class="xref" href="Sax.Helpers.XMLFilter.html">XMLFilter</a></div>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_IXMLReader.md&amp;value=---%0Auid%3A%20Sax.IXMLReader%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/XMLReader.cs/#L35" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script>
</body>
</html>