|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.databeans.io.XmlUtil
public final class XmlUtil
General utility methods for use with serialized data object XML documents.
Method Summary | |
---|---|
static org.jdom.Element |
findElement(Collection elements,
String attr,
String value)
|
static org.jdom.Element |
findElement(List elements,
String elementType)
Finds the first Elements of the given type
(elementType) in the list of Elements provided, and returns
it. |
static List |
findElements(List elements,
String elementType)
Finds all the Elements of the given type
(elementType) in the list of Elements provided, and returns
them in a list in order of discovery. |
static org.jdom.Element |
followNamePath(org.jdom.Element root,
String path)
|
static String |
getAttribute(org.jdom.Element element,
String name)
Get the value of a required attribute. |
static boolean |
getAttribute(org.jdom.Element element,
String name,
boolean defValue)
|
static int |
getAttribute(org.jdom.Element element,
String name,
int defValue)
|
static Map |
getAttributesAsMap(org.jdom.Element element)
Turn the attributes of an element into a java.util.Map. |
static boolean |
getBooleanAttribute(org.jdom.Element element,
String name)
Get the value of a required boolean attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.jdom.Element followNamePath(org.jdom.Element root, String path)
public static org.jdom.Element findElement(Collection elements, String attr, String value)
public static org.jdom.Element findElement(List elements, String elementType)
Elements
of the given type
(elementType) in the list of Elements provided, and returns
it.
elements
- The list of Elements to check.elementType
- The type of Elements to look for.
public static List findElements(List elements, String elementType)
Elements
of the given type
(elementType) in the list of Elements provided, and returns
them in a list in order of discovery.
elements
- The list of Elements to check.elementType
- The type of Elements to look for.
public static int getAttribute(org.jdom.Element element, String name, int defValue)
public static boolean getAttribute(org.jdom.Element element, String name, boolean defValue)
public static boolean getBooleanAttribute(org.jdom.Element element, String name) throws IllegalArgumentException
element
- The element to read from.name
- The attribute name.
IllegalArgumentException
- if attribute is missing or not a boolean.public static String getAttribute(org.jdom.Element element, String name) throws IllegalArgumentException
element
- The element to read from.name
- The attribute name.
IllegalArgumentException
- if attribute is missing.public static Map getAttributesAsMap(org.jdom.Element element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |