com.adventnet.utilities.xml.dom
Class XMLUtils

java.lang.Object
  extended by com.adventnet.utilities.xml.dom.XMLUtils

public class XMLUtils
extends java.lang.Object

Utility file for XMLNode handling.


Constructor Summary
XMLUtils()
           
 
Method Summary
static boolean booleanValue(java.lang.Object val)
          Returns the boolean value of the object persisted in the XML file.
static XMLNode getXMLNode(java.lang.String name)
          Returns a new Instance of XMLNode with nodetype as XMLNode.ELEMENT and with the name passed in the parameter.
static java.lang.String trueFalse(boolean value)
          Returns value to be persisted in the XML file for a boolean value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtils

public XMLUtils()
Method Detail

booleanValue

public static boolean booleanValue(java.lang.Object val)
Returns the boolean value of the object persisted in the XML file.

Parameters:
val - - object value persisted in the XML file. It may be through XMLNode.getAttribute() and XMLNode.getValue() methods
Returns:
true if object.toString() returns "t" or "true" ignoring the case. false if not.

trueFalse

public static java.lang.String trueFalse(boolean value)
Returns value to be persisted in the XML file for a boolean value.

Parameters:
val - - boolean value for persistence.
Returns:
the value to be persisted in the XML file. if the boolean value is true, returns "t", else returns "f".

getXMLNode

public static XMLNode getXMLNode(java.lang.String name)
Returns a new Instance of XMLNode with nodetype as XMLNode.ELEMENT and with the name passed in the parameter.

Parameters:
name - - Name to be set for the XMLNode.
Returns:
a new Instance of XMLNode with the given name. The nodeType will be XMLNode.ELEMENT.