|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.openholdem.util.DOMUtil
public class DOMUtil
This class was taken from an O'Reilly site on DOM utilities. It contains a few helper methods to make extracting out XML text from DOM representations a little easier.
Constructor Summary | |
---|---|
DOMUtil()
|
Method Summary | |
---|---|
static org.w3c.dom.Element |
getFirstElement(org.w3c.dom.Element element,
java.lang.String name)
Method returns the First occurence of Element 'name' in the DOM Node 'element'. |
static java.lang.String |
getSimpleElementText(org.w3c.dom.Element node)
This function is intended for use when you have merely text between an XML Element (i.e. |
static java.lang.String |
getSimpleElementText(org.w3c.dom.Element node,
java.lang.String name)
This function is intended when you have a DOM element with no other DOM elements inside (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DOMUtil()
Method Detail |
---|
public static org.w3c.dom.Element getFirstElement(org.w3c.dom.Element element, java.lang.String name) throws java.lang.Exception
Method returns the First occurence of Element 'name' in the DOM Node 'element'.
element
- The DOM Element node to traverse.name
- The XML name of the Element to return.
java.lang.Exception
public static java.lang.String getSimpleElementText(org.w3c.dom.Element node, java.lang.String name) throws java.lang.Exception
This function is intended when you have a DOM element with no other DOM elements inside (i.e.
node
- The DOM 'SimpleElement' as defined in the Function definition.name
- The name of the Text to retreive.
java.lang.Exception
public static java.lang.String getSimpleElementText(org.w3c.dom.Element node)
This function is intended for use when you have merely text between an XML Element (i.e.
node
- The DOM XML Tag, with text inbetween.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |