org.greybird.xmliter
Interface XmlAttributes


public interface XmlAttributes

An iterator over the attributes of an XML element.


Method Summary
 boolean advance()
          Moves to the next attribute and returns true, or returns false if there are no more attributes.
 java.lang.String name()
          Returns the local name of the attribute.
 java.lang.String namespace()
          Returns the namespace URI of the attribute, or an empty string if the attribute has no namespace.
 java.lang.String value()
          Returns the value of the attribute, which may be an empty string.
 

Method Detail

advance

public boolean advance()
Moves to the next attribute and returns true, or returns false if there are no more attributes.

name

public java.lang.String name()
                      throws java.lang.IllegalStateException
Returns the local name of the attribute. This methed will not return null or an empty string.
Throws:
java.lang.IllegalStateException - if advance() has not yet been called.

namespace

public java.lang.String namespace()
                           throws java.lang.IllegalStateException
Returns the namespace URI of the attribute, or an empty string if the attribute has no namespace. This method will not return null.
Throws:
java.lang.IllegalStateException - if advance() has not yet been called.

value

public java.lang.String value()
                       throws java.lang.IllegalStateException
Returns the value of the attribute, which may be an empty string. This method will not return null.
Throws:
java.lang.IllegalStateException - if advance() has not yet been called.

Copyright (c) 2003 Mark T. Hayes; All Rights Reserved