tools
Class XmlUtils

java.lang.Object
  extended by tools.XmlUtils

public final class XmlUtils
extends java.lang.Object

Booch utility class providing helper functions for working with XML.


Method Summary
static boolean extractBooleanAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName)
          Deprecated.  
static boolean extractBooleanAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName, boolean defaultValue)
          Deprecated.  
static int[] extractIntegerArrayAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName)
          Deprecated.  
static int extractIntegerAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName)
          Deprecated.  
static int extractIntegerAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName, int defaultValue)
          Deprecated.  
static java.lang.String extractStringAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName)
          Deprecated.  
static java.lang.String extractStringAttribute(org.w3c.dom.NamedNodeMap nnp, java.lang.String attrName, java.lang.String defaultValue)
          Deprecated.  
static org.w3c.dom.Element findElementInFile(java.lang.String fileName, java.lang.String elementName)
          Opens and parses an xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

extractStringAttribute

public static java.lang.String extractStringAttribute(org.w3c.dom.NamedNodeMap nnp,
                                                      java.lang.String attrName)
Deprecated. 


extractStringAttribute

public static java.lang.String extractStringAttribute(org.w3c.dom.NamedNodeMap nnp,
                                                      java.lang.String attrName,
                                                      java.lang.String defaultValue)
Deprecated. 


extractIntegerAttribute

public static int extractIntegerAttribute(org.w3c.dom.NamedNodeMap nnp,
                                          java.lang.String attrName)
                                   throws ConfigurationException
Deprecated. 

Throws:
ConfigurationException

extractIntegerAttribute

public static int extractIntegerAttribute(org.w3c.dom.NamedNodeMap nnp,
                                          java.lang.String attrName,
                                          int defaultValue)
                                   throws ConfigurationException
Deprecated. 

Throws:
ConfigurationException

extractBooleanAttribute

public static boolean extractBooleanAttribute(org.w3c.dom.NamedNodeMap nnp,
                                              java.lang.String attrName)
                                       throws ConfigurationException
Deprecated. 

Throws:
ConfigurationException

extractBooleanAttribute

public static boolean extractBooleanAttribute(org.w3c.dom.NamedNodeMap nnp,
                                              java.lang.String attrName,
                                              boolean defaultValue)
                                       throws ConfigurationException
Deprecated. 

Throws:
ConfigurationException

extractIntegerArrayAttribute

public static int[] extractIntegerArrayAttribute(org.w3c.dom.NamedNodeMap nnp,
                                                 java.lang.String attrName)
                                          throws ConfigurationException
Deprecated. 

Throws:
ConfigurationException

findElementInFile

public static org.w3c.dom.Element findElementInFile(java.lang.String fileName,
                                                    java.lang.String elementName)
                                             throws ConfigurationException
Opens and parses an xml file. Searches the root level of the file for an element with the supplied name.

Parameters:
fileName - the name of the file to open
elementName - the name of the element to find
Returns:
the named element in the named file
Throws:
ConfigurationException - if there is any problem opening and parsing the file, or if the file does not contain a top level element with the given name.