org.jboss.cache.xml
Class XmlHelper

java.lang.Object
  extended by org.jboss.cache.xml.XmlHelper

public class XmlHelper
extends java.lang.Object

A simple XML utility class for reading configuration elements

Author:
Manik Surtani (manik@jboss.org)

Constructor Summary
XmlHelper()
           
 
Method Summary
static java.lang.String escapeBackslashes(java.lang.String value)
           
static java.lang.String getAttr(org.w3c.dom.Element elem, java.lang.String myName, java.lang.String tagName, java.lang.String attributeName)
           
static java.lang.String getElementContent(org.w3c.dom.Element element, boolean trim)
           
static boolean readBooleanContents(org.w3c.dom.Element element, java.lang.String tagName)
           
static boolean readBooleanContents(org.w3c.dom.Element element, java.lang.String tagName, boolean defaultValue)
           
static java.util.Properties readPropertiesContents(org.w3c.dom.Element element, java.lang.String tagName)
           
static java.lang.String readStringContents(org.w3c.dom.Element element, java.lang.String tagName)
           
static org.w3c.dom.Element stringToElement(java.lang.String xml)
           
 
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

getAttr

public static java.lang.String getAttr(org.w3c.dom.Element elem,
                                       java.lang.String myName,
                                       java.lang.String tagName,
                                       java.lang.String attributeName)

getElementContent

public static java.lang.String getElementContent(org.w3c.dom.Element element,
                                                 boolean trim)

readStringContents

public static java.lang.String readStringContents(org.w3c.dom.Element element,
                                                  java.lang.String tagName)

escapeBackslashes

public static java.lang.String escapeBackslashes(java.lang.String value)

readPropertiesContents

public static java.util.Properties readPropertiesContents(org.w3c.dom.Element element,
                                                          java.lang.String tagName)
                                                   throws java.io.IOException
Throws:
java.io.IOException

readBooleanContents

public static boolean readBooleanContents(org.w3c.dom.Element element,
                                          java.lang.String tagName)

readBooleanContents

public static boolean readBooleanContents(org.w3c.dom.Element element,
                                          java.lang.String tagName,
                                          boolean defaultValue)

stringToElement

public static org.w3c.dom.Element stringToElement(java.lang.String xml)
                                           throws java.lang.Exception
Throws:
java.lang.Exception


Copyright 1998-2005 JBoss Inc . All Rights Reserved.