JavaTM Platform
Standard Ed. 6

接口 org.xml.sax.Locator
的使用

使用 Locator 的软件包
javax.xml.bind.helpers 仅由 JAXB 提供者用于: 提供某些 javax.xml.bind 接口的部分默认实现。 
org.xml.sax 此包提供了核心 SAX API。 
org.xml.sax.ext 此包包含适合的 SAX 驱动程序不一定支持的 SAX2 设施的接口。 
org.xml.sax.helpers 此包包含“帮助器”类,其中包括对引导基于 SAX 的应用程序的支持。 
 

javax.xml.bind.helpers 中 Locator 的使用
 

参数类型为 Locator 的 javax.xml.bind.helpers 中的构造方法
ValidationEventLocatorImpl(Locator loc)
          根据 org.xml.sax.Locator 构造一个对象。
 

org.xml.sax 中 Locator 的使用
 

参数类型为 Locator 的 org.xml.sax 中的方法
 void ContentHandler.setDocumentLocator(Locator locator)
          接收用来查找 SAX 文档事件起源的对象。
 void DocumentHandler.setDocumentLocator(Locator locator)
          已过时。 接收用来查找 SAX 文档事件起源的对象。
 void HandlerBase.setDocumentLocator(Locator locator)
          已过时。 接收文档事件的 Locator 对象。
 

参数类型为 Locator 的 org.xml.sax 中的构造方法
SAXParseException(String message, Locator locator)
          从消息和 Locator 创建新的 SAXParseException。
SAXParseException(String message, Locator locator, Exception e)
          将现有的异常包装在 SAXParseException 中。
 

org.xml.sax.ext 中 Locator 的使用
 

org.xml.sax.ext 中 Locator 的子接口
 interface Locator2
          SAX2 扩展,用于扩充通过 Locator 提供的实体信息。
 

实现 Locator 的 org.xml.sax.ext 中的类
 class Locator2Impl
          用于保存附加 Entity 信息、实现 Locator2 接口的 SAX2 扩展帮助器。
 

参数类型为 Locator 的 org.xml.sax.ext 中的构造方法
Locator2Impl(Locator locator)
          复制现有 Locator 或 Locator2 对象。
 

org.xml.sax.helpers 中 Locator 的使用
 

实现 Locator 的 org.xml.sax.helpers 中的类
 class LocatorImpl
          提供 Locator 的可选的有用实现。
 

参数类型为 Locator 的 org.xml.sax.helpers 中的方法
 void DefaultHandler.setDocumentLocator(Locator locator)
          接收文档事件的 Locator 对象。
 void ParserAdapter.setDocumentLocator(Locator locator)
          适配器实现方法;不调用。
 void XMLFilterImpl.setDocumentLocator(Locator locator)
          过滤一个新的文档定位器事件。
 void XMLReaderAdapter.setDocumentLocator(Locator locator)
          设置文档定位器。
 

参数类型为 Locator 的 org.xml.sax.helpers 中的构造方法
LocatorImpl(Locator locator)
          复制构造方法。
 


JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。