|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.createtank.util.configuration.XMLConfiguration
public class XMLConfiguration
Utility class developed by createTank to allow simple parsing of configuration files written in XML. copyright (c) 1999,2006 createTank
| Constructor Summary | |
|---|---|
XMLConfiguration(java.lang.String configFile)
XMLConfiguration constructor. |
|
| Method Summary | |
|---|---|
java.util.Properties |
getProperties(java.lang.String elementTagName)
Returns Properties object containing attributes from within the element requested by tagName For use when the user knows that there is only one occurrance of the requested tagName within the XML document. |
java.util.Properties |
getProperties(java.lang.String elementTagName,
java.lang.String compAttr,
java.lang.String compValue)
Returns Properties object containing attributes from within the occurance of the element requested by tagName when its Attribute compAttr is equal to the value requested in compValue. |
java.util.List |
getPropertiesList(java.util.List tagTree,
java.util.List compAttr,
java.util.List compValue)
Returns List of Properties objects containing attributes from within the occurance of the element requested by the tagTree list, when its respective attribute compAttr is equal to the respective value in compValue. |
java.util.List |
getPropertiesList(java.lang.String elementTagName)
Returns a List of Properties objects containing attributes from multiple occurances of the elementTagName requested. |
java.util.List |
getPropertiesListByPath(java.lang.String path)
Allows passing of a UNIX style path as a String, in order to specify a specific set of nodes within the XML configuration file. |
static void |
main(java.lang.String[] args)
Starts the application. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLConfiguration(java.lang.String configFile)
throws org.xml.sax.SAXException,
java.io.IOException
configFile - java.lang.String The file to parse
org.xml.sax.SAXException - SAX specific exception
java.io.IOException - IOException| Method Detail |
|---|
public java.util.Properties getProperties(java.lang.String elementTagName)
throws NonexistentElementException
elementTagName - java.lang.String The XML tagName to get attributes from
NonexistentElementException - elementTagName does not exist within current XML document.
public java.util.Properties getProperties(java.lang.String elementTagName,
java.lang.String compAttr,
java.lang.String compValue)
throws NonexistentElementException
elementTagName - java.lang.String The XML tagName to get attributes fromcompAttr - the Element's Attribute with which to compare compValue in order to decide which Attributes to pass back.compValue - the value with which to compare to compAttr's value in order to decide which Attributes to pass back.
NonexistentElementException - elementTagName does not exist within current XML document.
public java.util.List getPropertiesList(java.lang.String elementTagName)
throws NonexistentElementException
elementTagName - java.lang.String The XML tagName to get attributes from
NonexistentElementException - elementTagName does not exist within current XML document.
public java.util.List getPropertiesListByPath(java.lang.String path)
throws NonexistentElementException
path - UNIX style path to node of interest...See above for details.
NonexistentElementException - thrown if element in path doesn't exist
public java.util.List getPropertiesList(java.util.List tagTree,
java.util.List compAttr,
java.util.List compValue)
throws NonexistentElementException
tagTree - java.util.List The XML tree pathcompAttr - java.util.List the respective tree path of Element's Attribute with which to compare compValue in order to decide which Attributes to pass back.compValue - java.util.List the respective tree path of the value with which to compare to compAttr's value in order to decide which Attributes to pass back.
NonexistentElementException - elementTagName does not exist within current XML document.public static void main(java.lang.String[] args)
args - an array of command-line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||