com.extrememessaging.ResponseMaster
Class CXMLHelper

java.lang.Object
  extended bycom.extrememessaging.ResponseMaster.CXMLHelper

public class CXMLHelper
extends java.lang.Object

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)
          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 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 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

NO_DATA_DEFAULT_STRING

public static final java.lang.String NO_DATA_DEFAULT_STRING
A crazy string to use as a default if you don't really want a default

See Also:
Constant Field Values

NO_DATA_DEFAULT_INTEGER

public static final int NO_DATA_DEFAULT_INTEGER
A crazy integer to use as a default if you don't really want a default

See Also:
Constant Field Values
Constructor Detail

CXMLHelper

public CXMLHelper()
Method Detail

getChildElementValue

public static java.lang.String getChildElementValue(org.w3c.dom.Element oParent,
                                                    java.lang.String sChildName,
                                                    java.lang.String sDefault)
Gets the value of a single child element from an Element(string)

Parameters:
oParent - The parent node to read from
sChildName - The name of the tag that you want the value of
sDefault - The default value to return if the value is missing

getChildElementValue

public 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)

Parameters:
oParent - The parent node to read from
sChildName - The name of the tag that you want the value of
nDefault - The default value to return if the value is missing

getChildElementValueList

public static java.lang.String[] getChildElementValueList(org.w3c.dom.Element oParent,
                                                          java.lang.String sChildName,
                                                          java.lang.String sDefault)
                                                   throws ResponseMasterException
Gets the value of a list of child elements from an Element(string)

Parameters:
oParent - The parent node to read from
sChildName - The name of the tag that you want the value of
sDefault - The default value to return if the value is missing
Throws:
ResponseMasterException

LoadFileIntoDOM

public static org.w3c.dom.Document LoadFileIntoDOM(java.lang.String sFileName)
                                            throws ResponseMasterException
Load a file into a DOM

Throws:
ResponseMasterException - is thrown if there is a problem

LoadStringIntoDOM

public static org.w3c.dom.Document LoadStringIntoDOM(java.lang.String sInput)
                                              throws ResponseMasterException
Load a string into a DOM

Throws:
ResponseMasterException - is thrown if there is a problem

SaveDocumentToDisk

public static void SaveDocumentToDisk(org.w3c.dom.Document doc,
                                      java.lang.String fileName)
                               throws ResponseMasterException
Throws:
ResponseMasterException