com.mccrory.scott.base
Class Dom4jHelper

java.lang.Object
  |
  +--com.mccrory.scott.base.Dom4jHelper

public class Dom4jHelper
extends java.lang.Object

Contains methods to make working with dom4j objects a little easier.

Version:
CVS $Id: Dom4jHelper.java,v 1.19 2002/08/04 22:04:53 smccrory Exp $
Author:
Scott McCrory.

Constructor Summary
Dom4jHelper()
          Dom4jHelper constructor.
 
Method Summary
static java.util.HashMap getAttributes(org.dom4j.Element element)
          Returns a HashMap of all the attributes in the passed-in XML/Dom4J Element.
static java.util.Vector getChildElementNames(org.dom4j.Element element)
          Returns the names of all the child elements of a passed-in Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dom4jHelper

public Dom4jHelper()
Dom4jHelper constructor.

Method Detail

getAttributes

public static java.util.HashMap getAttributes(org.dom4j.Element element)
Returns a HashMap of all the attributes in the passed-in XML/Dom4J Element. Example:
 HashMap attribMap = Dom4jHelper.getAttributes(myElement);
 

Parameters:
element - org.dom4j.Element that you want the attributes of.
Returns:
java.util.HashMap of all the attributes of the element.

getChildElementNames

public static java.util.Vector getChildElementNames(org.dom4j.Element element)
Returns the names of all the child elements of a passed-in Element. Example:
 Vector childElements = Dom4jHelper.getChildElementNames(myElement);
 

Parameters:
element - org.dom4j.Element that you want the child element names of.
Returns:
java.util.Vector of the names of all the child elements.


Copyright © 2002 Scott McCrory as part of the Spumoni project. All Rights Reserved.