blob: 5bcd206ba0c66c6938c2d794b2af3b23d8775935 [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 ILexicalHandler
| Apache Lucene.NET 4.8.0-beta00013 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface ILexicalHandler
| Apache Lucene.NET 4.8.0-beta00013 Documentation ">
<meta name="generator" content="docfx 2.56.2.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">
<span id="forkongithub"><a href="https://github.com/apache/lucenenet" target="_blank">Fork me on GitHub</a></span>
<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.Ext.ILexicalHandler">
<h1 id="Sax_Ext_ILexicalHandler" data-uid="Sax.Ext.ILexicalHandler" class="text-break">Interface ILexicalHandler
</h1>
<div class="markdown level0 summary"><p>SAX2 extension handler for lexical events.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="Sax.Ext.html">Sax.Ext</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.Benchmark.dll</h6>
<h5 id="Sax_Ext_ILexicalHandler_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface ILexicalHandler</code></pre>
</div>
<h5 id="Sax_Ext_ILexicalHandler_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>
This is an optional extension handler for SAX2 to provide
lexical information about an XML document, such as comments
and CDATA section boundaries.
XML readers are not required to recognize this handler, and it
is not part of core-only SAX2 distributions.
<p>
The events in the lexical handler apply to the entire document,
not just to the document element, and all lexical handler events
must appear between the content handler&apos;s StartDocument and
EndDocument events.
<p>
To set the LexicalHandler for an XML reader, use the
<a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_SetProperty_System_String_System_Object_">SetProperty(String, Object)</a> method
with the property name
<a href="http://xml.org/sax/properties/lexical-handler">http://xml.org/sax/properties/lexical-handler</a>
and an object implementing this interface (or null) as the value.
If the reader does not report lexical events, it will throw a
<a class="xref" href="Sax.SAXNotRecognizedException.html">SAXNotRecognizedException</a>
when you attempt to register the handler.</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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_Comment_System_Char___System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.Comment(System.Char%5B%5D%2CSystem.Int32%2CSystem.Int32)%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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L178">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_Comment_" data-uid="Sax.Ext.ILexicalHandler.Comment*"></a>
<h4 id="Sax_Ext_ILexicalHandler_Comment_System_Char___System_Int32_System_Int32_" data-uid="Sax.Ext.ILexicalHandler.Comment(System.Char[],System.Int32,System.Int32)">Comment(Char[], Int32, Int32)</h4>
<div class="markdown level1 summary"><p>Report an XML comment anywhere in the document.
<p>
This callback will be used for comments inside or outside the
document element, including comments in the external DTD
subset(if read). Comments in the DTD must be properly
nested inside start/endDTD and start/endEntity events(if
used).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Comment(char[] ch, int start, int length)</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.Char</span>[]</td>
<td><span class="parametername">ch</span></td>
<td><p>An array holding the characters in the comment.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">start</span></td>
<td><p>The starting position in the array.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">length</span></td>
<td><p>The number of characters to use from the array.</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.SAXException.html">SAXException</a></td>
<td><p>The application may raise an exception.</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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_EndCDATA.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.EndCDATA%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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L163">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_EndCDATA_" data-uid="Sax.Ext.ILexicalHandler.EndCDATA*"></a>
<h4 id="Sax_Ext_ILexicalHandler_EndCDATA" data-uid="Sax.Ext.ILexicalHandler.EndCDATA">EndCDATA()</h4>
<div class="markdown level1 summary"><p>Report the end of a CDATA section.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void EndCDATA()</code></pre>
</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>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_EndCDATA_seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_StartCDATA">StartCDATA()</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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_EndDTD.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.EndDTD%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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L90">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_EndDTD_" data-uid="Sax.Ext.ILexicalHandler.EndDTD*"></a>
<h4 id="Sax_Ext_ILexicalHandler_EndDTD" data-uid="Sax.Ext.ILexicalHandler.EndDTD">EndDTD()</h4>
<div class="markdown level1 summary"><p>Report the end of DTD declarations.
<p>
This method is intended to report the end of the
DOCTYPE declaration; if the document has no DOCTYPE declaration,
this method will not be invoked.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void EndDTD()</code></pre>
</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>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_EndDTD_seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_StartDTD_System_String_System_String_System_String_">StartDTD(String, String, 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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_EndEntity_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.EndEntity(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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L143">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_EndEntity_" data-uid="Sax.Ext.ILexicalHandler.EndEntity*"></a>
<h4 id="Sax_Ext_ILexicalHandler_EndEntity_System_String_" data-uid="Sax.Ext.ILexicalHandler.EndEntity(System.String)">EndEntity(String)</h4>
<div class="markdown level1 summary"><p>Report the end of an entity.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void EndEntity(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 name of the entity that is ending.</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.SAXException.html">SAXException</a></td>
<td><p>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_EndEntity_System_String__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_StartEntity_System_String_">StartEntity(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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_StartCDATA.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.StartCDATA%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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L156">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_StartCDATA_" data-uid="Sax.Ext.ILexicalHandler.StartCDATA*"></a>
<h4 id="Sax_Ext_ILexicalHandler_StartCDATA" data-uid="Sax.Ext.ILexicalHandler.StartCDATA">StartCDATA()</h4>
<div class="markdown level1 summary"><p>Report the start of a CDATA section.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void StartCDATA()</code></pre>
</div>
<h5 id="Sax_Ext_ILexicalHandler_StartCDATA_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The contents of the CDATA section will be reported through
the regular <a class="xref" href="Sax.IContentHandler.html#Sax_IContentHandler_Characters_System_Char___System_Int32_System_Int32_">Characters(Char[], Int32, Int32)</a>
event; this event is intended only to report
the boundary.</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>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_StartCDATA_seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_EndEntity_System_String_">EndEntity(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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_StartDTD_System_String_System_String_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.StartDTD(System.String%2CSystem.String%2CSystem.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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L78">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_StartDTD_" data-uid="Sax.Ext.ILexicalHandler.StartDTD*"></a>
<h4 id="Sax_Ext_ILexicalHandler_StartDTD_System_String_System_String_System_String_" data-uid="Sax.Ext.ILexicalHandler.StartDTD(System.String,System.String,System.String)">StartDTD(String, String, String)</h4>
<div class="markdown level1 summary"><p>Report the start of DTD declarations, if any.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void StartDTD(string name, string publicId, 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">name</span></td>
<td><p>The document type name.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">publicId</span></td>
<td><p>The declared public identifier for the
external DTD subset, or null if none was declared.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">systemId</span></td>
<td><p>The declared system identifier for the
external DTD subset, or null if none was declared.
(Note that this is not resolved against the document
base URI.)</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_StartDTD_System_String_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is intended to report the beginning of the
DOCTYPE declaration; if the document has no DOCTYPE declaration,
this method will not be invoked.
<p>
All declarations reported through
<a class="xref" href="Sax.IDTDHandler.html">IDTDHandler</a> or
<a class="xref" href="Sax.Ext.IDeclHandler.html">IDeclHandler</a> events must appear
between the startDTD and <a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_EndDTD">EndDTD()</a> events.
Declarations are assumed to belong to the internal DTD subset
unless they appear between <a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_StartEntity_System_String_">StartEntity(String)</a>
and <a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_EndEntity_System_String_">EndEntity(String)</a> events. Comments and
processing instructions from the DTD should also be reported
between the <a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_StartDTD_System_String_System_String_System_String_">StartDTD(String, String, String)</a> and <a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_EndDTD">EndDTD()</a> events, in their original
order of(logical) occurrence; they are not required to
appear in their correct locations relative to <a class="xref" href="Sax.IDTDHandler.html">IDTDHandler</a>
or <a class="xref" href="Sax.Ext.IDeclHandler.html">IDeclHandler</a> events, however.
<p>
Note that the start / endDTD events will appear within
the start / endDocument events from <a class="xref" href="Sax.IContentHandler.html">IContentHandler</a> and
before the first <a class="xref" href="Sax.IContentHandler.html#Sax_IContentHandler_StartElement_System_String_System_String_System_String_Sax_IAttributes_">StartElement(String, String, String, IAttributes)</a>
event.</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>The application may raise an exception.</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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler_StartEntity_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler.StartEntity(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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L135">View Source</a>
</span>
<a id="Sax_Ext_ILexicalHandler_StartEntity_" data-uid="Sax.Ext.ILexicalHandler.StartEntity*"></a>
<h4 id="Sax_Ext_ILexicalHandler_StartEntity_System_String_" data-uid="Sax.Ext.ILexicalHandler.StartEntity(System.String)">StartEntity(String)</h4>
<div class="markdown level1 summary"><p>Report the beginning of some internal and external XML entities.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void StartEntity(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 name of the entity. If it is a parameter
entity, the name will begin with &apos;%&apos;, and if it is the
external DTD subset, it will be &quot;[dtd]&quot;.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_StartEntity_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The reporting of parameter entities (including
the external DTD subset) is optional, and SAX2 drivers that
report LexicalHandler events may not implement it; you can use the
<a href="http://xml.org/sax/features/lexical-handler/parameter-entities">http://xml.org/sax/features/lexical-handler/parameter-entities</a>
feature to query or control the reporting of parameter entities.
<p>
General entities are reported with their regular names,
parameter entities have &apos;%&apos; prepended to their names, and
the external DTD subset has the pseudo-entity name &quot;[dtd]&quot;.
<p>
When a SAX2 driver is providing these events, all other
events must be properly nested within start/end entity
events. There is no additional requirement that events from
<a class="xref" href="Sax.Ext.IDeclHandler.html">IDeclHandler</a> or
<a class="xref" href="Sax.IDTDHandler.html">IDTDHandler</a> be properly ordered.
<p>
Note that skipped entities will be reported through the
<a class="xref" href="Sax.IContentHandler.html#Sax_IContentHandler_SkippedEntity_System_String_">SkippedEntity(String)</a>
event, which is part of the ContentHandler interface.
<p>Because of the streaming event model that SAX uses, some
entity boundaries cannot be reported under any
circumstances:
<ul><li>general entities within attribute values</li><li>parameter entities within declarations</li></ul>
<p>These will be silently expanded, with no indication of where
the original entity boundaries were.
<p>Note also that the boundaries of character references (which
are not really entities anyway) are not reported.
<p>All start/endEntity events must be properly nested.</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>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_ILexicalHandler_StartEntity_System_String__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_EndEntity_System_String_">EndEntity(String)</a></div>
<div><a class="xref" href="Sax.Ext.IDeclHandler.html#Sax_Ext_IDeclHandler_InternalEntityDecl_System_String_System_String_">InternalEntityDecl</a>(<span class="xref">System.String</span>, <span class="xref">System.String</span>)</div>
<div><a class="xref" href="Sax.Ext.IDeclHandler.html#Sax_Ext_IDeclHandler_ExternalEntityDecl_System_String_System_String_System_String_">ExternalEntityDecl</a>(<span class="xref">System.String</span>, <span class="xref">System.String</span>, <span class="xref">System.String</span>)</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-beta00013/websites/apidocs/apiSpec/new?filename=Sax_Ext_ILexicalHandler.md&amp;value=---%0Auid%3A%20Sax.Ext.ILexicalHandler%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/fix/apidocs-layout/src/Lucene.Net.Benchmark/Support/Sax/Ext/LexicalHandler.cs/#L40" 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 The Apache Software Foundation, Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache License, Version 2.0</a><br> <small>Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. <br>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</small>
</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>