org.gnu.xml.ezparse
Interface Element


public interface Element

Represents an Element encountered during parsing an XML document. Please be sure to read getValue() documentation.

Since:
J2SDK 1.4

Method Summary
 java.lang.String getAttribute(java.lang.String name)
          Returns the value for attribute with name 'name'.
 org.xml.sax.Attributes getAttributes()
          Returns this element's attributes.
 java.lang.String getLocalName()
          Returns this element's local name.
 java.lang.String getNamespaceURI()
          Returns this element's namespace URI if one exists.
 java.lang.String getQualifiedName()
          Returns this element's qualified name.
 java.lang.String getValue()
          Returns this element's value if it has one or null.
 

Method Detail

getNamespaceURI

public java.lang.String getNamespaceURI()
Returns this element's namespace URI if one exists.

Returns:
namespace URI if one exists otherwise null

getLocalName

public java.lang.String getLocalName()
Returns this element's local name.

Returns:
the local name

getQualifiedName

public java.lang.String getQualifiedName()
Returns this element's qualified name. It may return null if namespaces are not used.

Returns:
the qualified name if it exists or null

getAttributes

public org.xml.sax.Attributes getAttributes()
Returns this element's attributes.

Returns:
element attributes

getValue

public java.lang.String getValue()
Returns this element's value if it has one or null. Note that if this method is called before endElement() is called, this value will be null. This method is only meant to be called from endElement().

Returns:
element value or null

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Returns the value for attribute with name 'name'. This is a convenience method.

Parameters:
name - the attribute name
Returns:
attribute value or null