Modifier and Type | Method and Description |
---|---|
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.
|
public static boolean isNil(Element element)
element
- the element to testpublic static String getAttribute(Element element, XmlNode definition)
element
- the element to checkdefinition
- the definition of the attribute to retrieve from the elementpublic static String getText(Node node)
node
- the node to parsepublic static Element findSibling(Element sibling, XmlNode target)
sibling
- the sibling DOM element to begin the searchtarget
- the node to search forpublic 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