O'Reilly logo

Enterprise Application Integration With XML and Java™ by Bill la Forge, JP Morgenthal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Class org.xml.sax.helpers.LocatorImpl

java.lang.Object
   |
   +—org.xml.sax.helpers.LocatorImpl

public class LocatorImpl

extends Object

implements Locator —Provides an optional convenience implementation of Locator.

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:

Locator locator;
Locator startloc;
public void setLocator (Locator locator)
{
        // note the locator
  this.locator = locator;
}
public void startDocument ()
{
        // save the location of the start of the document
        // for future use.
  Locator startloc = new LocatorImpl(locator);
}

Normally, parser writers will not use this class, since it is more efficient to provide location information only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required