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