Class Locator
Provide an optional convenience implementation of ILocator.
Implements
Inherited Members
Namespace: Sax.Helpers
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class Locator : ILocator
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.
Constructors
Locator()
Zero-argument constructor.
This will not normally be useful, since the main purpose of this class is to make a snapshot of an existing ILocator.Declaration
public Locator()
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.
Locator(ILocator)
Copy constructor.
Create a persistent copy of the current state of a locator. When the original locator changes, this copy will still keep the original values (and it can be used outside the scope of DocumentHandler methods).Declaration
public Locator(ILocator locator)
Parameters
Type | Name | Description |
---|---|---|
ILocator | locator | The locator to copy. |
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.
Properties
ColumnNumber
Gets the saved column number (1-based). Returns the column number as an integer, or -1 if none is available.
Declaration
public int ColumnNumber { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.
See Also
LineNumber
Gets the saved line number (1-based). Returns the line number as an integer, or -1 if none is available.
Declaration
public int LineNumber { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.
See Also
PublicId
Gets the public identifier as a string, or null if none is available.
Declaration
public string PublicId { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.
See Also
SystemId
Gets the system identifier as a string, or null if none is available.
Declaration
public string SystemId { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:ILocator locator;
ILocator startloc;
public void SetLocator(ILocator locator)
{
// note the locator
this.locator = locator;
}
public void StartDocument()
{
// save the location of the start of the document
// for future use.
ILocator startloc = new Locator(locator);
}
Normally, parser writers will not use this class, since it
is more efficient to provide location information only when
requested, rather than constantly updating a ILocator object.