public class NSDomTools extends Object
| Constructor and Description |
|---|
NSDomTools() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
boolAttr(Node n,
String ns,
String aname) |
static boolean |
boolAttr(Node n,
String ns,
String aname,
boolean defval) |
static boolean |
boolNode(Node rootnode,
String ns,
String name)
Finds the child node with the name specified, and returns it as a
boolean value.
|
static Date |
dateNode(Node rn,
String ns,
String name) |
static Date |
dateNode(Node rn,
String ns,
String name,
Date dflt) |
static double |
doubleNode(Node rootnode,
String ns,
String name,
double val) |
static int |
getNodeAttribute(Node n,
String ns,
String aname,
int defval)
Get the named attribute from a node.
|
static String |
getNodeAttribute(Node n,
String ns,
String aname,
String defval)
Get the named attribute from a node.
|
static Node |
getRootElement(Document doc) |
static String[] |
getStringList(Node inn,
String itemname) |
static List<String> |
getStringList(Node inn,
String listname,
String itemname) |
static int |
intAttr(Node n,
String ns,
String aname) |
static int |
intAttr(Node n,
String ns,
String aname,
int defval) |
static int |
intNode(Node rootnode,
String ns,
String name) |
static int |
intNode(Node rootnode,
String ns,
String name,
int val) |
static long |
longNode(Node rootnode,
String ns,
String name) |
static long |
longNode(Node rootnode,
String ns,
String name,
long val) |
static Node |
nodeFind(Node rn,
String ns,
String name)
Finds a single element with the name spec'd in the node.
|
static String |
strAttr(Node n,
String ns,
String aname,
String def) |
static String |
stringNode_untrimmed(Node rootnode,
String ns,
String name)
Finds the child node with the name specified, and returns it's text
value.
|
static String |
stringNode_untrimmed(Node rootnode,
String ns,
String name,
String deflt)
Finds the child node with the name specified, and returns it's text
value.
|
static String |
stringNode(Node rootnode,
String ns,
String name)
Finds the child node with the name specified, and returns it's text
value.
|
static String |
stringNode(Node rootnode,
String ns,
String name,
int trunclen)
Finds the child node with the name specified, and returns it's text
value.
|
static String |
stringNode(Node rootnode,
String ns,
String name,
String deflt)
Finds the child node with the name specified, and returns it's text
value.
|
static String |
textFrom_untrimmed(Node n)
Gets the text part contained in a node...
|
static String |
textFrom(Node n)
Gets the text part contained in a node...
|
static int |
timeNode(Node rn,
String ns,
String name,
int dflt)
Scans a node as a hh:mm:ss time (or hh:mm).
|
public static Node nodeFind(Node rn, String ns, String name) throws Exception
Exceptionpublic static String textFrom_untrimmed(Node n)
public static String textFrom(Node n)
public static String stringNode(Node rootnode, String ns, String name) throws Exception
Exceptionpublic static String stringNode(Node rootnode, String ns, String name, int trunclen) throws Exception
Exceptionpublic static String stringNode(Node rootnode, String ns, String name, String deflt) throws Exception
Exceptionpublic static String stringNode_untrimmed(Node rootnode, String ns, String name) throws Exception
Exceptionpublic static String stringNode_untrimmed(Node rootnode, String ns, String name, String deflt) throws Exception
Exceptionpublic static Date dateNode(Node rn, String ns, String name) throws Exception
Exceptionpublic static Date dateNode(Node rn, String ns, String name, Date dflt) throws Exception
Exceptionpublic static int timeNode(Node rn, String ns, String name, int dflt) throws Exception
rn - name - dflt - Exceptionpublic static int intNode(Node rootnode, String ns, String name) throws Exception
Exceptionpublic static int intNode(Node rootnode, String ns, String name, int val) throws Exception
Exceptionpublic static long longNode(Node rootnode, String ns, String name) throws Exception
Exceptionpublic static long longNode(Node rootnode, String ns, String name, long val) throws Exception
Exceptionpublic static double doubleNode(Node rootnode, String ns, String name, double val) throws Exception
Exceptionpublic static boolean boolNode(Node rootnode, String ns, String name) throws Exception
Exceptionpublic static String getNodeAttribute(Node n, String ns, String aname, String defval)
n - the node to containing the attribute.aname - the name of the attribute.defval - the value to return if the attribute is not present,public static int intAttr(Node n, String ns, String aname, int defval) throws Exception
Exceptionpublic static int intAttr(Node n, String ns, String aname) throws Exception
Exceptionpublic static boolean boolAttr(Node n, String ns, String aname) throws Exception
Exceptionpublic static boolean boolAttr(Node n, String ns, String aname, boolean defval) throws Exception
Exceptionpublic static int getNodeAttribute(Node n, String ns, String aname, int defval) throws Exception
n - the node to containing the attribute.aname - the name of the attribute.defval - the value to return if the attribute is not present,Exceptionpublic static final String[] getStringList(Node inn, String itemname) throws Exception
Exceptionpublic static final List<String> getStringList(Node inn, String listname, String itemname) throws Exception
ExceptionCopyright © 2017 etc.to. All rights reserved.