|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.xml.sax.helpers.XMLReaderAdapter
public class XMLReaderAdapter
SAX2 XMLReader を SAX1 Parser として適応させます。
このモジュールは、ソースコード、文書ともに公開ドメインに置かれています。したがって、内容に関する保証は一切提供されません。詳細については、http://www.saxproject.org を参照してください。
このクラスは、SAX 2 XMLReader をラップして、SAX1 Parser として動作させます。 XMLReader は、http://xml.org/sax/features/namespace-prefixes プロパティーの値が true であるときの条件をサポートしている必要があります。サポートしていない場合、構文解析に失敗し、SAXException がスローされます。 XMLReader が http://xml.org/sax/features/namespaces プロパティーの値が false であるときの条件をサポートしている場合は、効率を改善するためにそれが使用されます。
Parser,
XMLReader| コンストラクタの概要 | |
|---|---|
XMLReaderAdapter()
新しいアダプタを作成します。 |
|
XMLReaderAdapter(XMLReader xmlReader)
新しいアダプタを作成します。 |
|
| メソッドの概要 | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
SAX2 の文字イベントを適応させます。 |
void |
endDocument()
文書イベントを終了します。 |
void |
endElement(String uri,
String localName,
String qName)
SAX2 の要素終了イベントを適応させます。 |
void |
endPrefixMapping(String prefix)
SAX2 の前置修飾子のマッピング終了イベントを適応させます。 |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
SAX2 の無視できる空白文字イベントを適応させます。 |
void |
parse(InputSource input)
文書を構文解析します。 |
void |
parse(String systemId)
文書を構文解析します。 |
void |
processingInstruction(String target,
String data)
SAX2 の処理命令イベントを適応させます。 |
void |
setDocumentHandler(DocumentHandler handler)
SAX1 文書イベントハンドラを登録します。 |
void |
setDocumentLocator(Locator locator)
文書ロケータを設定します。 |
void |
setDTDHandler(DTDHandler handler)
DTD イベントハンドラを登録します。 |
void |
setEntityResolver(EntityResolver resolver)
エンティティーリゾルバを登録します。 |
void |
setErrorHandler(ErrorHandler handler)
エラーイベントハンドラを登録します。 |
void |
setLocale(Locale locale)
エラー報告のためのロケールを設定します。 |
void |
skippedEntity(String name)
SAX2 のスキップされたエンティティーイベントを適応させます。 |
void |
startDocument()
文書イベントを開始します。 |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
SAX2 の要素開始イベントを適応させます。 |
void |
startPrefixMapping(String prefix,
String uri)
SAX2 の前置修飾子のマッピング開始イベントを適応させます。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public XMLReaderAdapter()
throws SAXException
「org.xml.sax.driver」プロパティーを使用して、組み込む SAX2 ドライバを特定します。
SAXException - 組み込みドライバをインスタンス化できない場合、または org.xml.sax.driver プロパティーが指定されていない場合public XMLReaderAdapter(XMLReader xmlReader)
SAX2 XMLReader をラップする新しいアダプタを作成します。このアダプタは、XMLReader を SAX1 Parser として機能させます。
xmlReader - ラップする SAX2 XMLReader
NullPointerException - 引数が null の場合| メソッドの詳細 |
|---|
public void setLocale(Locale locale)
throws SAXException
このメソッドは、SAX2 ではサポートされていません。 このため、常に例外をスローします。
Parser 内の setLocalelocale - エラー報告のロケール
SAXException - オーバーライドされない場合はスローされるParser.setLocale(java.util.Locale)public void setEntityResolver(EntityResolver resolver)
Parser 内の setEntityResolverresolver - 新しいリゾルバParser.setEntityResolver(org.xml.sax.EntityResolver)public void setDTDHandler(DTDHandler handler)
Parser 内の setDTDHandlerhandler - 新しい DTD イベントハンドラParser.setDTDHandler(org.xml.sax.DTDHandler)public void setDocumentHandler(DocumentHandler handler)
SAX1 文書ハンドラは名前空間をサポートしません。
Parser 内の setDocumentHandlerhandler - 新しい SAX1 文書イベントハンドラParser.setDocumentHandler(org.xml.sax.DocumentHandler)public void setErrorHandler(ErrorHandler handler)
Parser 内の setErrorHandlerhandler - 新しいエラーイベントハンドラParser.setErrorHandler(org.xml.sax.ErrorHandler)
public void parse(String systemId)
throws IOException,
SAXException
組み込み XMLReader が http://xml.org/sax/features/namespace-prefixes プロパティーをサポートしない場合、このメソッドは例外をスローします。
Parser 内の parsesystemId - 文書の絶対 URL
IOException - 文書の raw コンテンツの読み取り時に問題が発生した場合
SAXException - 文書処理時に 問題が発生した場合parse(org.xml.sax.InputSource),
Parser.parse(java.lang.String)
public void parse(InputSource input)
throws IOException,
SAXException
組み込み XMLReader が http://xml.org/sax/features/namespace-prefixes プロパティーをサポートしない場合、このメソッドは例外をスローします。
Parser 内の parseinput - 文書の入力ソース
IOException - 文書の raw コンテンツの読み取り時に問題が発生した場合
SAXException - 文書処理時に 問題が発生した場合parse(java.lang.String),
Parser.parse(org.xml.sax.InputSource)public void setDocumentLocator(Locator locator)
ContentHandler 内の setDocumentLocatorlocator - 文書ロケータContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void startDocument()
throws SAXException
ContentHandler 内の startDocumentSAXException - クライアントで処理例外が 発生する可能性があるContentHandler.startDocument()
public void endDocument()
throws SAXException
ContentHandler 内の endDocumentSAXException - クライアントで処理例外が 発生する可能性があるContentHandler.endDocument()
public void startPrefixMapping(String prefix,
String uri)
ContentHandler 内の startPrefixMappingprefix - マッピングされる前置修飾子uri - マッピング先の名前空間 URIContentHandler.startPrefixMapping(java.lang.String, java.lang.String)public void endPrefixMapping(String prefix)
ContentHandler 内の endPrefixMappingprefix - マッピングされる前置修飾子ContentHandler.endPrefixMapping(java.lang.String)
public void startElement(String uri,
String localName,
String qName,
Attributes atts)
throws SAXException
ContentHandler 内の startElementuri - 名前空間 URIlocalName - 名前空間のローカル名qName - 前置修飾子付きの修飾名atts - SAX2 属性
SAXException - クライアントで処理例外が 発生する可能性があるContentHandler.endDocument()
public void endElement(String uri,
String localName,
String qName)
throws SAXException
ContentHandler 内の endElementuri - 名前空間 URIlocalName - 名前空間のローカル名qName - 前置修飾子付きの修飾名
SAXException - クライアントで処理例外が 発生する可能性があるContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void characters(char[] ch,
int start,
int length)
throws SAXException
ContentHandler 内の charactersch - 文字配列start - 配列内の開始位置length - 使用する文字数
SAXException - クライアントで処理例外が 発生する可能性があるContentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ContentHandler 内の ignorableWhitespacech - 文字配列start - 配列内の開始位置length - 使用する文字数
SAXException - クライアントで処理例外が 発生する可能性があるContentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target,
String data)
throws SAXException
ContentHandler 内の processingInstructiontarget - 処理命令のターゲットdata - 処理命令を受けるデータ
SAXException - クライアントで処理例外が 発生する可能性があるContentHandler.processingInstruction(java.lang.String, java.lang.String)
public void skippedEntity(String name)
throws SAXException
ContentHandler 内の skippedEntityname - スキップされたエンティティーの名前
SAXException - サブクラスによってスロー可能ContentHandler.skippedEntity(java.lang.String)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。