|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.extrememessaging.ResponseMaster.CXMLHelper
public class CXMLHelper
A class that helps with reading configuration information from XML files
Field Summary | |
---|---|
static int |
NO_DATA_DEFAULT_INTEGER
A crazy integer to use as a default if you don't really want a default |
static java.lang.String |
NO_DATA_DEFAULT_STRING
A crazy string to use as a default if you don't really want a default |
Constructor Summary | |
---|---|
CXMLHelper()
|
Method Summary | |
---|---|
static int |
getChildElementValue(org.w3c.dom.Element oParent,
java.lang.String sChildName,
int nDefault)
Gets the value of a single child element from an Element(string) |
static java.lang.String |
getChildElementValue(org.w3c.dom.Element oParent,
java.lang.String sChildName,
java.lang.String sDefault)
|
static java.lang.String |
getChildElementValue(org.w3c.dom.Element oParent,
java.lang.String sChildName,
java.lang.String sDefault,
boolean bAllowEmptyString)
Gets the value of a single child element from an Element(string) |
static java.lang.String[] |
getChildElementValueList(org.w3c.dom.Element oParent,
java.lang.String sChildName,
java.lang.String sDefault)
Gets the value of a list of child elements from an Element(string) |
static int |
getNthChildElementValue(org.w3c.dom.Element oParent,
java.lang.String sChildName,
int n,
int nDefault)
Gets the value of a single child element from an Element(string) |
static java.lang.String |
getNthChildElementValue(org.w3c.dom.Element oParent,
java.lang.String sChildName,
int n,
java.lang.String sDefault)
Gets the value of a single child element from an Element(string) |
static org.w3c.dom.Document |
LoadFileIntoDOM(java.lang.String sFileName)
Load a file into a DOM |
static org.w3c.dom.Document |
LoadStringIntoDOM(java.lang.String sInput)
Load a string into a DOM |
static java.lang.String |
NodeToString(org.w3c.dom.Node node)
|
static void |
SaveDocumentToDisk(org.w3c.dom.Document doc,
java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NO_DATA_DEFAULT_STRING
public static final int NO_DATA_DEFAULT_INTEGER
Constructor Detail |
---|
public CXMLHelper()
Method Detail |
---|
public static java.lang.String getChildElementValue(org.w3c.dom.Element oParent, java.lang.String sChildName, java.lang.String sDefault)
public static java.lang.String getChildElementValue(org.w3c.dom.Element oParent, java.lang.String sChildName, java.lang.String sDefault, boolean bAllowEmptyString)
oParent
- The parent node to read fromsChildName
- The name of the tag that you want the value ofsDefault
- The default value to return if the value is missingbAllowEmptyString
- If false, an empty node will return sDefault rather than an empty string.public static int getChildElementValue(org.w3c.dom.Element oParent, java.lang.String sChildName, int nDefault)
oParent
- The parent node to read fromsChildName
- The name of the tag that you want the value ofnDefault
- The default value to return if the value is missingpublic static java.lang.String getNthChildElementValue(org.w3c.dom.Element oParent, java.lang.String sChildName, int n, java.lang.String sDefault)
oParent
- The parent node to read fromsChildName
- The name of the tag that you want the value ofn
- The 1-based index of the child to read (eg 2 means to return the value of the second child element with that namesDefault
- The default value to return if the value is missingpublic static int getNthChildElementValue(org.w3c.dom.Element oParent, java.lang.String sChildName, int n, int nDefault)
oParent
- The parent node to read fromsChildName
- The name of the tag that you want the value ofn
- The 1-based index of the child to read (eg 2 means to return the value of the second child element with that namenDefault
- The default value to return if the value is missingpublic static java.lang.String[] getChildElementValueList(org.w3c.dom.Element oParent, java.lang.String sChildName, java.lang.String sDefault) throws ResponseMasterException
oParent
- The parent node to read fromsChildName
- The name of the tag that you want the value ofsDefault
- The default value to return if the value is missing
ResponseMasterException
public static org.w3c.dom.Document LoadFileIntoDOM(java.lang.String sFileName) throws ResponseMasterException
ResponseMasterException
- is thrown if there is a problempublic static org.w3c.dom.Document LoadStringIntoDOM(java.lang.String sInput) throws ResponseMasterException
ResponseMasterException
- is thrown if there is a problempublic static void SaveDocumentToDisk(org.w3c.dom.Document doc, java.lang.String fileName) throws ResponseMasterException
ResponseMasterException
public static java.lang.String NodeToString(org.w3c.dom.Node node) throws ResponseMasterException
ResponseMasterException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |