Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Locator

    Provide an optional convenience implementation of ILocator.

    Inheritance
    object
    Locator
    Locator2
    Implements
    ILocator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    ColumnNumber

    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
    LineNumber

    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
    PublicId

    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.
    See Also
    SystemId

    Implements

    ILocator
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.