|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectjp.go.nict.langrid.commons.dom.NodeUtil
jp.go.nict.langrid.commons.dom.ElementUtil
public class ElementUtil
Elementに関するユーティリティを集めたクラス。
| コンストラクタの概要 | |
|---|---|
ElementUtil()
|
|
| メソッドの概要 | |
|---|---|
static Iterable<Element> |
getChildNodes(Element parent)
子ノードにアクセスするIterableオブジェクトを返す。 |
static Collection<Element> |
getChildNodes(Element parent,
String tagName)
子ノードにアクセスするIterableオブジェクトを返す。 |
static String |
getChildNodeText(Element parent,
String childTagName)
指定されたタグ名を持つ子ノードのテキストを取得する。 |
static Element |
getFirstChild(Element parent,
String childTagName)
指定されたタグ名を持つ子ノードを取得する。 |
static Document |
prepareParentDocument(Element element)
渡されたelementがDocument直下になるよう調整する。 |
static void |
removeChildren(Element parent)
親から全ての子要素を取り除く。 |
static void |
removeChildren(Element parent,
String tagName)
親から指定されたelementと同じNodeNameを持つ子要素を取り除く。 |
static void |
replaceElements(Element parent,
Element element)
親から指定されたelementと同じNodeNameを持つ子要素を置換する。 |
static String |
toString(Element element)
ElementをDocumentUtil.toString(Document)を使用して文字列に変換して返す。 |
| クラス jp.go.nict.langrid.commons.dom.NodeUtil から継承されたメソッド |
|---|
getAttribute |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public ElementUtil()
| メソッドの詳細 |
|---|
public static void removeChildren(Element parent,
String tagName)
parent - 親elementtagName - 取り除くelementのタグ名public static void removeChildren(Element parent)
parent - 親element
public static void replaceElements(Element parent,
Element element)
parent - 親elementelement - 置換するelementpublic static Document prepareParentDocument(Element element)
element - 調整するelement
public static Iterable<Element> getChildNodes(Element parent)
parent - 子ノードを取得する親ノード
public static Collection<Element> getChildNodes(Element parent,
String tagName)
parent - 子ノードを取得する親ノードtagName - 子ノードのタグ名
public static String getChildNodeText(Element parent,
String childTagName)
parent - 親ノードchildTagName - 子ノードのタグ名
public static Element getFirstChild(Element parent,
String childTagName)
parent - 親ノードchildTagName - 子ノードのタグ名
public static final String toString(Element element)
element - 変換するElement
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||