edu.utexas.its.eis.tools.qwicap.template.xml.structure
Interface XMLDeclaration

All Superinterfaces:
Cloneable, Item, Iterable<Attribute>, Range

public interface XMLDeclaration
extends Item, Iterable<Attribute>

Common interface of all classes representing XML declarations ("<?xml version="1.0" encoding="UTF-8"?>") in XML documents.

Author:
Chris W. Johnson

Method Summary
 AttributeEnumeration enumerateAttributes()
          Returns an enumeration of the attributes of this tag.
 Attribute getAttribute(Characters AttrName)
          Returns a reference to the specified attribute of this tag, or null if this tag has no such attribute.
 String getAttribute(String AttrName)
          Returns a String representing the value of the requested attribute of this tag, or null if this tag has no such attribute.
 String getEncoding()
          Convenience method for getting the value of the "encoding" attribute, if any.
 String getVersion()
          Convenience method for getting the value of the "version" attribute, if any.
 Iterator<Attribute> iterator()
          Returns an iterator for the attributes of this tag.
 
Methods inherited from interface edu.utexas.its.eis.tools.qwicap.template.xml.structure.Item
contentEquals, getContent
 
Methods inherited from interface edu.utexas.its.eis.tools.qwicap.template.xml.structure.Range
clone, isEmptyTag, isEndTag, isStartTag, isTagWithAttributes, rangeEquals, toString, write
 

Method Detail

getVersion

String getVersion()
Convenience method for getting the value of the "version" attribute, if any. For example: "1.0".

Returns:
The value of the "version" attribute, or null if there is no such attribute.

getEncoding

String getEncoding()
Convenience method for getting the value of the "encoding" attribute, if any. For example: "UTF-8".

Returns:
The value of the "encoding" attribute, or null if there is no such attribute.

getAttribute

Attribute getAttribute(Characters AttrName)
Returns a reference to the specified attribute of this tag, or null if this tag has no such attribute.

Parameters:
AttrName - The name of the attribute to retrieve from this tag.
Returns:
A reference to the requested attribute of this tag, or null if this tag has no such attribute.

getAttribute

String getAttribute(String AttrName)
Returns a String representing the value of the requested attribute of this tag, or null if this tag has no such attribute.

Parameters:
AttrName - The name of the attribute whose value should be retrieved.
Returns:
A String representing the value of the requested attribute of this tag, or null if this tag has no such attribute.

enumerateAttributes

AttributeEnumeration enumerateAttributes()
Returns an enumeration of the attributes of this tag. Note that the Iterable>Attribute< interface, which makes possible the use of Java 1.5's "for each" loop, is also supported by this interface.

Returns:
An enumeration of the attributes of this tag.
See Also:
iterator()

iterator

Iterator<Attribute> iterator()
Returns an iterator for the attributes of this tag.

Specified by:
iterator in interface Iterable<Attribute>
Returns:
An iterator for the attributes of this tag.