|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.xml.XMLHelp
Helper for managing XML-Structures
| Field Summary | |
private static java.util.Hashtable |
ENTITIES
XML Entities |
| Constructor Summary | |
private |
XMLHelp()
Constructor |
| Method Summary | |
static java.lang.String |
asString(org.w3c.dom.Node node)
Converts the XML Document into a String |
static java.lang.String |
encodeXml(java.lang.String str)
Method encodeXml |
static java.lang.String |
getAttribute(org.w3c.dom.Node node,
java.lang.String attribute)
Returns the value for an attribute from a node |
static java.lang.String |
getSafeAttribute(org.w3c.dom.Element element,
java.lang.String node,
java.lang.String attribute)
Method getSafeAttribute |
static java.lang.String |
getSafeAttribute(org.w3c.dom.Node node,
java.lang.String attribute)
Method getSafeAttribute |
static boolean |
getSafeAttributeBoolean(org.w3c.dom.Node node,
java.lang.String attribute,
boolean defValue)
Method getSafeAttributeBoolean |
static double |
getSafeAttributeDouble(org.w3c.dom.Node node,
java.lang.String attribute,
double defValue)
Method getSafeAttributeDouble |
static int |
getSafeAttributeInt(org.w3c.dom.Node node,
java.lang.String attribute,
int defValue)
Method getSafeAttributeInt |
static boolean |
getSafeBoolean(org.w3c.dom.Node element,
java.lang.String node)
Method getSafeBoolean |
static int |
getSafeInt(org.w3c.dom.Element element,
java.lang.String node,
int defValue)
Method getSafeInt |
static java.lang.String |
getSafeString(org.w3c.dom.Element element,
java.lang.String node,
java.lang.String subNode)
Method getSafeString |
static java.lang.String |
getSafeString(org.w3c.dom.Node element)
Method getSafeString |
static java.lang.String |
getSafeString(org.w3c.dom.Node element,
java.lang.String node)
Method getSafeString |
static void |
setNodePrefix(org.w3c.dom.Node node,
java.lang.String prefix)
Sets a node prefix |
static boolean |
toBool(java.lang.String str)
Converts a string to a boolean |
static byte[] |
toByteVector(org.w3c.dom.Node node)
Converts a Node to a byte vector |
static void |
writeDomTree(java.io.OutputStream out,
org.w3c.dom.Node node)
Prints the specified node, recursively. |
static void |
writeDomTree(java.io.OutputStream out,
org.w3c.dom.Node node,
java.nio.charset.Charset encoding)
Prints the specified node, recursively. |
static void |
writeNode(java.io.PrintStream out,
org.w3c.dom.Node node,
java.lang.String encoding)
Prints the specified node, recursively. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.util.Hashtable ENTITIES
| Constructor Detail |
private XMLHelp()
| Method Detail |
public static java.lang.String encodeXml(java.lang.String str)
str - String to encode
public static java.lang.String asString(org.w3c.dom.Node node)
throws java.io.IOException
node - Node
java.io.IOException - If an input or output exception occurred
public static void writeDomTree(java.io.OutputStream out,
org.w3c.dom.Node node)
throws java.io.IOException
out - OutputStreamnode - Node
java.io.IOException - If an input or output exception occurred
public static void writeDomTree(java.io.OutputStream out,
org.w3c.dom.Node node,
java.nio.charset.Charset encoding)
throws java.io.IOException
out - OutputStreamnode - Nodeencoding - The character encoding
java.io.IOException - If an input or output exception occurred
public static void writeNode(java.io.PrintStream out,
org.w3c.dom.Node node,
java.lang.String encoding)
throws java.io.IOException
out - OutputStreamnode - Nodeencoding - The character encoding
java.io.IOException - If an input or output exception occurred
public static void setNodePrefix(org.w3c.dom.Node node,
java.lang.String prefix)
throws java.io.IOException
node - The nodeprefix - The prefix
java.io.IOException - If an input or output exception occurred
public static byte[] toByteVector(org.w3c.dom.Node node)
throws java.io.IOException
node - Node
java.io.IOException - If an input or output exception occurred
public static java.lang.String getAttribute(org.w3c.dom.Node node,
java.lang.String attribute)
node - The nodeattribute - The wanted attribute
public static java.lang.String getSafeAttribute(org.w3c.dom.Element element,
java.lang.String node,
java.lang.String attribute)
element - Elementnode - Nodeattribute - Attribute
public static java.lang.String getSafeAttribute(org.w3c.dom.Node node,
java.lang.String attribute)
node - Nodeattribute - Attribute
public static boolean getSafeAttributeBoolean(org.w3c.dom.Node node,
java.lang.String attribute,
boolean defValue)
node - Nodeattribute - AttributedefValue - Default value
public static int getSafeAttributeInt(org.w3c.dom.Node node,
java.lang.String attribute,
int defValue)
node - Nodeattribute - AttributedefValue - The default value
public static double getSafeAttributeDouble(org.w3c.dom.Node node,
java.lang.String attribute,
double defValue)
node - Nodeattribute - AttributedefValue - default value
public static boolean getSafeBoolean(org.w3c.dom.Node element,
java.lang.String node)
element - Elementnode - Node
public static int getSafeInt(org.w3c.dom.Element element,
java.lang.String node,
int defValue)
element - Elementnode - NodedefValue - The default value
public static java.lang.String getSafeString(org.w3c.dom.Node element)
element - Element
public static java.lang.String getSafeString(org.w3c.dom.Element element,
java.lang.String node,
java.lang.String subNode)
element - Elementnode - NodesubNode - SubNode
public static java.lang.String getSafeString(org.w3c.dom.Node element,
java.lang.String node)
element - Elementnode - Node
public static boolean toBool(java.lang.String str)
str - String to converter
true if the argument stands for true;
false otherwise.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||