com.izforge.izpack.util.xml
Class XMLHelper

java.lang.Object
  extended by com.izforge.izpack.util.xml.XMLHelper

public class XMLHelper
extends java.lang.Object

A Collection of convenient XML-Helper Methods and Constants

Version:
$Revision: 1.1 $
Author:
marc.eppelmann@gmx.de

Field Summary
static java.lang.String _0
          _0 = "0"
static java.lang.String _1
          _1 = "1"
static java.lang.String FALSE
          FALSE = "FALSE"
static java.lang.String NO
          NO = "NO"
static java.lang.String OFF
          OFF = "OFF"
static java.lang.String ON
          ON = "ON"
static java.lang.String TRUE
          TRUE = "TRUE"
static java.lang.String YES
          YES = "YES"
 
Constructor Summary
XMLHelper()
          Creates a new XMLHelper object.
 
Method Summary
static boolean attributeIsFalse(XMLElement element, java.lang.String name)
          The Opposit of AttributeIsTrue()
static boolean attributeIsTrue(XMLElement element, java.lang.String name)
          Determines if the named attribute in true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YES

public static final java.lang.String YES
YES = "YES"

See Also:
Constant Field Values

NO

public static final java.lang.String NO
NO = "NO"

See Also:
Constant Field Values

TRUE

public static final java.lang.String TRUE
TRUE = "TRUE"

See Also:
Constant Field Values

FALSE

public static final java.lang.String FALSE
FALSE = "FALSE"

See Also:
Constant Field Values

ON

public static final java.lang.String ON
ON = "ON"

See Also:
Constant Field Values

OFF

public static final java.lang.String OFF
OFF = "OFF"

See Also:
Constant Field Values

_1

public static final java.lang.String _1
_1 = "1"

See Also:
Constant Field Values

_0

public static final java.lang.String _0
_0 = "0"

See Also:
Constant Field Values
Constructor Detail

XMLHelper

public XMLHelper()
Creates a new XMLHelper object.

Method Detail

attributeIsTrue

public static boolean attributeIsTrue(XMLElement element,
                                      java.lang.String name)
Determines if the named attribute in true. True is represented by any of the following strings and is not case sensitive.


Every other string, including the empty string as well as the non-existence of the attribute will cuase false to be returned.

Parameters:
element - the XMLElement to search for the attribute.
name - the name of the attribute to test.
Returns:
true if the attribute value equals one of the pre-defined strings, false otherwise.

attributeIsFalse

public static boolean attributeIsFalse(XMLElement element,
                                       java.lang.String name)
The Opposit of AttributeIsTrue()

Parameters:
element - the element to inspect
name - the attribute to inspect
Returns:
returns true if name attribute of the given element contains "false"