|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.nava.informa.utils.XmlPathUtils
public class XmlPathUtils
Utility class providing methods access XML attributes and elements using a path.
| Method Summary | |
|---|---|
static String |
getAttributeValue(org.jdom.Element parent,
String childPath,
String attribute)
Returns the value of the attribute of the child element reached by the given path. |
static String[] |
getAttributeValues(org.jdom.Element element,
String[] attributes)
Returns the values of the attributes of given element. |
static String[] |
getAttributeValues(org.jdom.Element parent,
String childPath,
String[] attributes)
Returns the value of the child element reached by the given path. |
static String |
getElementValue(org.jdom.Element parent,
String childPath)
Returns the value of an element's child element reached by the given path. |
static String[] |
getElementValues(org.jdom.Element parent,
String[] children)
Returns the values of the specified sub-elements of the child parent element. |
static String[] |
getElementValues(org.jdom.Element parent,
String childPath,
String[] elements)
Returns the values of the specified sub-elements of the child element reached by the given path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getElementValue(org.jdom.Element parent,
String childPath)
parent - the parent ElementchildPath - a path to the root of the elements.
Paths are specified as element names, separated by a "/".
Namespaces are allowed. e.g. "aaa:bbb/ccc:ddd/eee".
parent is
null, returns null. If
childPath is null, returns the value of the parent.
public static String[] getElementValues(org.jdom.Element parent,
String childPath,
String[] elements)
parent - the parent ElementchildPath - a path to the root of the elements.
Paths are specified as element names, separated by a "/".
Namespaces are allowed. e.g. "aaa:bbb/ccc:ddd/eee".elements - An array of element names. May contain namespace specifiers.
parent or elements is
null, returns null. If
childPath is null, returns the specified sub-elements
of the parent.
public static String[] getElementValues(org.jdom.Element parent,
String[] children)
parent - the parent Elementchildren - An array of child element names. May contain namespace specifiers.
parent or children
is null, returns null.
public static String getAttributeValue(org.jdom.Element parent,
String childPath,
String attribute)
parent - the parent ElementchildPath - a path to the root of the elements.
Paths are specified as element names, separated by a "/".attribute - the attribute.
May contain a namespace specifier e.g. "rdf:resource".
parent or attribute is
null, returns null .
If childPath is null, returns the specified
attribute of the parent.
public static String[] getAttributeValues(org.jdom.Element parent,
String childPath,
String[] attributes)
parent - the parent ElementchildPath - a path to the root of the elements. Paths are specified
as element names, separated by a "/". Namespaces are allowed.
e.g. "aaa:bbb/ccc:ddd/eee".attributes - - An array of element names. May contain namespace
specifiers.
parent or
attributes is null, returns
null. If childPath is null, returns
the specified attributes of the parent.
public static String[] getAttributeValues(org.jdom.Element element,
String[] attributes)
element - the Elementattributes - An array of attribute names.
May contain namespace specifiers.
element or attributes
is null, returns null .
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||