jp.co.cybec.cb3.accessor.fileaccess.xml
クラス XMLPath

java.lang.Object
  上位を拡張 jp.co.cybec.cb3.accessor.fileaccess.xml.XMLPath

public class XMLPath
extends Object

XMLファイルのXPathを表すクラス。

作成者:
Daisuke Suga

コンストラクタの概要
protected XMLPath()
          コンストラクタ。
protected XMLPath(String key, org.apache.xmlbeans.XmlCursor cursor, String path)
          コンストラクタ。
protected XMLPath(String key, org.apache.xmlbeans.XmlObject xml, String path)
          コンストラクタ。
 
メソッドの概要
 XMLElement next()
          次のXMLElementを取得します。
 XMLPath selectChildPath(String path)
          現在のノードから指定された子のパスを検索し、XMLPathを返却します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

XMLPath

protected XMLPath()
コンストラクタ。


XMLPath

protected XMLPath(String key,
                  org.apache.xmlbeans.XmlObject xml,
                  String path)
           throws BadXmlGrammerException,
                  AccessorUnknownException
コンストラクタ。
XMLファイルのXmlCursorを作成し、指定されたパスで検索します。

パラメータ:
key - アクセッサのキー名
xml - XmlObject
path - 検索パス
例外:
BadXmlGrammerException - XMLの文法が間違っているときに発生します。
AccessorUnknownException - アクセッサで不明のエラーがおきたときに発生します。

XMLPath

protected XMLPath(String key,
                  org.apache.xmlbeans.XmlCursor cursor,
                  String path)
コンストラクタ。
指定されたXmlCursorで初期化します。

パラメータ:
key - アクセッサのキー名
cursor - XmlCursor
path - 検索パス
メソッドの詳細

next

public XMLElement next()
                throws AccessorUnknownException
次のXMLElementを取得します。
取得するXMLElementがない場合はnullを返します。

戻り値:
XMLElement
例外:
AccessorUnknownException - アクセッサで不明のエラーがおきたときに発生します。

selectChildPath

public XMLPath selectChildPath(String path)
                        throws BadXmlGrammerException,
                               AccessorUnknownException
現在のノードから指定された子のパスを検索し、XMLPathを返却します。

パラメータ:
path - 検索するパス
戻り値:
XMLPath
例外:
BadXmlGrammerException - XMLの文法が間違っているときに発生します。
AccessorUnknownException - アクセッサで不明のエラーがおきたときに発生します。


Copyright © 2008 Cyber Beans Corporation. All Rights Reserved.