Name

Locator2

Synopsis

This interface defines an extension to the core Locator interface. If the implementation supports it, then the Locator object passed to ContentHandler.setDocumentLocator( ) will implement this interface. You can also test for support by querying the feature named “http://xml.org/sax/features/use-locator2”.

org.xml.sax.ext.Locator2

Figure 22-11. org.xml.sax.ext.Locator2

public interface Locator2 extends org.xml.sax.Locator {
// Public Instance Methods
     String getEncoding( );  
     String getXMLVersion( );  
}

Implementations

Locator2Impl

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.