|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kitfox.xml.XMLParseUtil
public class XMLParseUtil
Method Summary | |
---|---|
static double |
findDouble(java.lang.String val)
Searches the given string for the first floating point number it contains, parses and returns it. |
static float |
findFloat(java.lang.String val)
Searches the given string for the first floating point number it contains, parses and returns it. |
static int |
findInt(java.lang.String val)
Searches the given string for the first integer point number it contains, parses and returns it. |
static boolean |
getAttribBoolean(org.w3c.dom.Element ele,
java.lang.String name)
Parses the given attribute of this tag and returns it as a boolean. |
static double |
getAttribDouble(org.w3c.dom.Element ele,
java.lang.String name)
Parses the given attribute of this tag and returns it as a double. |
static float |
getAttribFloat(org.w3c.dom.Element ele,
java.lang.String name)
Parses the given attribute of this tag and returns it as a float |
static int |
getAttribInt(org.w3c.dom.Element ele,
java.lang.String name)
Parses the given attribute of this tag and returns it as an int. |
static int |
getAttribIntHex(org.w3c.dom.Element ele,
java.lang.String name)
Parses the given attribute of this tag as a hexadecimal encoded string and returns it as an int |
static java.lang.String |
getAttribString(org.w3c.dom.Element ele,
java.lang.String name)
Parses the given attribute of this tag and returns it as a String. |
static java.net.URL |
getAttribURL(org.w3c.dom.Element ele,
java.lang.String name,
java.net.URL docRoot)
|
static ReadableXMLElement |
getElement(java.lang.Class classType,
org.w3c.dom.Element root,
java.lang.String name,
java.net.URL docRoot)
Returns the first ReadableXMLElement with the given name |
static java.lang.Object[] |
getElementArray(java.lang.Class classType,
org.w3c.dom.Element root,
java.lang.String name,
java.net.URL docRoot)
|
static int[] |
getElementArrayInt(org.w3c.dom.Element root,
java.lang.String name,
java.lang.String attrib)
Takes a number of tags of name 'name' that are children of 'root', and looks for attributes of 'attrib' on them. |
static java.lang.String[] |
getElementArrayString(org.w3c.dom.Element root,
java.lang.String name,
java.lang.String attrib)
Takes a number of tags of name 'name' that are children of 'root', and looks for attributes of 'attrib' on them. |
static java.util.HashMap |
getElementHashMap(java.lang.Class classType,
org.w3c.dom.Element root,
java.lang.String name,
java.lang.String key,
java.net.URL docRoot)
Returns a HashMap of nodes that are children of root. |
static java.util.HashSet |
getElementHashSet(java.lang.Class classType,
org.w3c.dom.Element root,
java.lang.String name,
java.net.URL docRoot)
|
static java.util.LinkedList |
getElementLinkedList(java.lang.Class classType,
org.w3c.dom.Element root,
java.lang.String name,
java.net.URL docRoot)
|
static org.w3c.dom.Element |
getFirstChild(org.w3c.dom.Element root,
java.lang.String name)
Returns the first node that is a direct child of root with the coresponding name. |
static java.lang.String |
getTagText(org.w3c.dom.Element ele)
Scans the tag's children and returns the first text element found |
static boolean |
isDouble(java.lang.String val)
|
static java.awt.Color |
parseColor(java.lang.String val)
|
static double |
parseDouble(java.lang.String val)
|
static double[] |
parseDoubleList(java.lang.String list)
Scans an input string for double values. |
static float |
parseFloat(java.lang.String val)
|
static float[] |
parseFloatList(java.lang.String list)
|
static int |
parseHex(java.lang.String val)
|
static int |
parseInt(java.lang.String val)
|
static int[] |
parseIntList(java.lang.String list)
|
static NumberWithUnits |
parseNumberWithUnits(java.lang.String val)
|
static double |
parseRatio(java.lang.String val)
The input string represents a ratio. |
static java.lang.String[] |
parseStringList(java.lang.String list)
|
static java.util.HashMap |
parseStyle(java.lang.String styleString)
Takes a CSS style string and retursn a hash of them. |
static java.util.HashMap |
parseStyle(java.lang.String styleString,
java.util.HashMap map)
Takes a CSS style string and retursn a hash of them. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getTagText(org.w3c.dom.Element ele)
public static org.w3c.dom.Element getFirstChild(org.w3c.dom.Element root, java.lang.String name)
public static java.lang.String[] parseStringList(java.lang.String list)
public static boolean isDouble(java.lang.String val)
public static double parseDouble(java.lang.String val)
public static double findDouble(java.lang.String val)
public static double[] parseDoubleList(java.lang.String list)
public static float parseFloat(java.lang.String val)
public static float findFloat(java.lang.String val)
public static float[] parseFloatList(java.lang.String list)
public static int parseInt(java.lang.String val)
public static int findInt(java.lang.String val)
public static int[] parseIntList(java.lang.String list)
public static int parseHex(java.lang.String val)
public static double parseRatio(java.lang.String val)
public static NumberWithUnits parseNumberWithUnits(java.lang.String val)
public static java.awt.Color parseColor(java.lang.String val)
public static java.lang.String getAttribString(org.w3c.dom.Element ele, java.lang.String name)
public static int getAttribInt(org.w3c.dom.Element ele, java.lang.String name)
public static int getAttribIntHex(org.w3c.dom.Element ele, java.lang.String name)
public static float getAttribFloat(org.w3c.dom.Element ele, java.lang.String name)
public static double getAttribDouble(org.w3c.dom.Element ele, java.lang.String name)
public static boolean getAttribBoolean(org.w3c.dom.Element ele, java.lang.String name)
public static java.net.URL getAttribURL(org.w3c.dom.Element ele, java.lang.String name, java.net.URL docRoot)
public static ReadableXMLElement getElement(java.lang.Class classType, org.w3c.dom.Element root, java.lang.String name, java.net.URL docRoot)
public static java.util.HashMap getElementHashMap(java.lang.Class classType, org.w3c.dom.Element root, java.lang.String name, java.lang.String key, java.net.URL docRoot)
public static java.util.HashSet getElementHashSet(java.lang.Class classType, org.w3c.dom.Element root, java.lang.String name, java.net.URL docRoot)
public static java.util.LinkedList getElementLinkedList(java.lang.Class classType, org.w3c.dom.Element root, java.lang.String name, java.net.URL docRoot)
public static java.lang.Object[] getElementArray(java.lang.Class classType, org.w3c.dom.Element root, java.lang.String name, java.net.URL docRoot)
public static int[] getElementArrayInt(org.w3c.dom.Element root, java.lang.String name, java.lang.String attrib)
public static java.lang.String[] getElementArrayString(org.w3c.dom.Element root, java.lang.String name, java.lang.String attrib)
public static java.util.HashMap parseStyle(java.lang.String styleString)
styleString
- - A CSS formatted string of styles. Eg,
"font-size:12;fill:#d32c27;fill-rule:evenodd;stroke-width:1pt;"public static java.util.HashMap parseStyle(java.lang.String styleString, java.util.HashMap map)
styleString
- - A CSS formatted string of styles. Eg,
"font-size:12;fill:#d32c27;fill-rule:evenodd;stroke-width:1pt;"map
- - A map to which these styles will be added
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |