|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ten60.netkernel.util.XMLReadable
Thin wrapper over a DOM to provide fast XPath lookup on values in convenient ways
Constructor Summary | |
XMLReadable(Node aContextNode)
Creates a new instance of XMLReadable |
Method Summary | |
int |
getInt(String aXPath,
int aDefault)
return an integer from text value of the text at a node given by the expression. |
List |
getNodes(String aXPath)
return a list of nodes that match the given expression |
String |
getText(String aXPath)
return a string value of the text of a single node, returns an empty string if node not found |
List |
getTexts(String aXPath,
boolean aTrim)
return a list of strings that are the text values of elements matching the given expression |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLReadable(Node aContextNode)
aContextNode
- the context node that relative expressions are evaluated againstMethod Detail |
public List getNodes(String aXPath)
public List getTexts(String aXPath, boolean aTrim)
aTrim
- if true trims the resulting strings of whitespacepublic String getText(String aXPath)
public int getInt(String aXPath, int aDefault)
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |