org.schmant.support.xml.dom
Class DomSupport

java.lang.Object
  extended by org.schmant.support.xml.dom.DomSupport

public final class DomSupport
extends Object

Utility class with static methods for working with DOM documents.

Since:
0.7.1
Author:
Karl Gustafsson

Method Summary
static String getAttribute(Node n, String name)
          Get the value of a named attribute in an element node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttribute

public static String getAttribute(Node n,
                                  String name)
                           throws SchmantException
Get the value of a named attribute in an element node.

Parameters:
n - An element node.
name - The name of the attribute.
Returns:
The attribute value.
Throws:
SchmantException - If the attribute is missing.