org.rimudb.util
Class XMLHelper

java.lang.Object
  extended by org.rimudb.util.XMLHelper

public class XMLHelper
extends java.lang.Object

Author:
Simon Ritchie

Constructor Summary
XMLHelper()
           
 
Method Summary
static boolean getAttributeAsBoolean(org.w3c.dom.Element element, java.lang.String name)
           
static int getAttributeAsInt(org.w3c.dom.Element element, java.lang.String name)
           
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element element, java.lang.String tagName)
          Return the first element that is a child of 'element' with the name 'tagName'.
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element element, java.lang.String namespaceURI, java.lang.String tagName)
          Return the first element that is a child of 'element' with the name 'tagName'.
static java.lang.String getTextValue(org.w3c.dom.Element element, java.lang.String tagName)
          Return the text value for the first element that is a child of 'element' with the name 'tagName'.
static java.lang.String getTextValue(org.w3c.dom.Element element, java.lang.String namespaceURI, java.lang.String tagName)
          Return the text value for the first element that is a child of 'element' with the name 'tagName'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLHelper

public XMLHelper()
Method Detail

getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element element,
                                                       java.lang.String namespaceURI,
                                                       java.lang.String tagName)
Return the first element that is a child of 'element' with the name 'tagName'.

Parameters:
element - Element
namespaceURI - String
tagName - String
Returns:
Element

getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element element,
                                                       java.lang.String tagName)
Return the first element that is a child of 'element' with the name 'tagName'.

Parameters:
element - Element
tagName - String
Returns:
Element

getTextValue

public static java.lang.String getTextValue(org.w3c.dom.Element element,
                                            java.lang.String namespaceURI,
                                            java.lang.String tagName)
Return the text value for the first element that is a child of 'element' with the name 'tagName'.

Parameters:
element - Element
namespaceURI - String
tagName - String
Returns:
String

getTextValue

public static java.lang.String getTextValue(org.w3c.dom.Element element,
                                            java.lang.String tagName)
Return the text value for the first element that is a child of 'element' with the name 'tagName'.

Parameters:
element - Element
tagName - String
Returns:
String

getAttributeAsInt

public static int getAttributeAsInt(org.w3c.dom.Element element,
                                    java.lang.String name)

getAttributeAsBoolean

public static boolean getAttributeAsBoolean(org.w3c.dom.Element element,
                                            java.lang.String name)


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.