|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.internal.parser.format.xml.XmlNodeUtil
public class XmlNodeUtil
Utility class for working with a document object model and an XmlNode
.
Method Summary | |
---|---|
static Element |
findChild(Node parent,
XmlNode target,
int offset)
Finds the Nth matching child of a DOM element. |
static Element |
findSibling(Element sibling,
XmlNode target)
Returns a sibling element that matches a given definition, or null if no match is found. |
static String |
getAttribute(Element element,
XmlNode definition)
Returns the value of an attribute for an element. |
static String |
getText(Node node)
Returns the child text from a DOM node. |
static boolean |
isNil(Element element)
Tests if an element is nil. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isNil(Element element)
element
- the element to test
public static String getAttribute(Element element, XmlNode definition)
element
- the element to checkdefinition
- the definition of the attribute to retrieve from the element
public static String getText(Node node)
node
- the node to parse
public static Element findSibling(Element sibling, XmlNode target)
sibling
- the sibling DOM element to begin the searchtarget
- the node to search for
public static Element findChild(Node parent, XmlNode target, int offset)
parent
- the parent DOM nodetarget
- the node to search foroffset
- the occurrence of the matching node
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |