com.aetrion.flickr.util
Class XMLUtilities

java.lang.Object
  extended by com.aetrion.flickr.util.XMLUtilities

public class XMLUtilities
extends java.lang.Object

Version:
$Id: XMLUtilities.java,v 1.9 2009/03/04 18:46:58 x-mago Exp $
Author:
Anthony Eden

Method Summary
static boolean getBooleanAttribute(org.w3c.dom.Element el, java.lang.String name)
           
static org.w3c.dom.Element getChild(org.w3c.dom.Element element, java.lang.String name)
          Get the first child element with the given name.
static java.util.Collection getChildElements(org.w3c.dom.Node node)
           
static java.lang.String getChildValue(org.w3c.dom.Element element, java.lang.String name)
          Get the value of the fist child element with the given name.
static int getIntAttribute(org.w3c.dom.Element el, java.lang.String name)
           
static java.lang.String getValue(org.w3c.dom.Element element)
          Get the text value for the specified element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChildElements

public static java.util.Collection getChildElements(org.w3c.dom.Node node)

getValue

public static java.lang.String getValue(org.w3c.dom.Element element)
Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.

Parameters:
element - The Element
Returns:
The value String or null

getChild

public static org.w3c.dom.Element getChild(org.w3c.dom.Element element,
                                           java.lang.String name)
Get the first child element with the given name.

Parameters:
element - The parent element
name - The child element name
Returns:
The child element or null

getChildValue

public static java.lang.String getChildValue(org.w3c.dom.Element element,
                                             java.lang.String name)
Get the value of the fist child element with the given name.

Parameters:
element - The parent element
name - The child element name
Returns:
The child element value or null

getIntAttribute

public static int getIntAttribute(org.w3c.dom.Element el,
                                  java.lang.String name)

getBooleanAttribute

public static boolean getBooleanAttribute(org.w3c.dom.Element el,
                                          java.lang.String name)


Copyright (C) 2005-2008 Aetrion LLC. All Rights Reserved.