JavaTM 2 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 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。