gd.xml.tiny
Interface ParsedXML


public interface ParsedXML

Stores an element of parsed XML. Instances of this class are used to compose a parse tree. It's methods may be used to retrieve it's attributes and it's child nodes.


Method Summary
 java.util.Enumeration attributes()
          Used to obtain an enumeration of the attributes applied to an XML element.
 java.util.Enumeration elements()
          Used to obtain an enumeration of this node's children.
 java.lang.String getAttribute(java.lang.String a)
          Used to obtain the value of a tag attribute.
 java.lang.String getContent()
          Used to obtain the textual content of tags, comments and CDATA.
 java.lang.String getName()
          Used to obtain the tag name which produced this node.
 java.lang.String getTypeName()
           
 boolean isEmpty()
          Used to determine whether the tag which generated this node was empty.
 

Method Detail

getTypeName

public java.lang.String getTypeName()
Returns:
a short string which descibes the contents of this node

getName

public java.lang.String getName()
Used to obtain the tag name which produced this node.
Returns:
a tag name or null if node was not generated by a tag

getContent

public java.lang.String getContent()
Used to obtain the textual content of tags, comments and CDATA.
Returns:
a string, may be null

isEmpty

public boolean isEmpty()
Used to determine whether the tag which generated this node was empty. This method always returns true when called on nodes not generated by tags.
Returns:
true if the tag was empty, false otherwise

elements

public java.util.Enumeration elements()
Used to obtain an enumeration of this node's children. The children of a node correspond to data contained between start and end tag pairs. The enumeration is always empty for nodes which were not generated from tag pairs.
Returns:
the child nodes

attributes

public java.util.Enumeration attributes()
Used to obtain an enumeration of the attributes applied to an XML element. The contents of the enumeration are the names of attributes within an XML start tag. The enumeration is always empty for nodes which were not generated by tags.
Returns:
the names of tag attributes as strings

getAttribute

public java.lang.String getAttribute(java.lang.String a)
Used to obtain the value of a tag attribute.
Returns:
the value of the specified attribute or null if it doesn't exist