Name
AttributesImpl
Synopsis
This utility class is a general-purpose
implementation of the Attributes interface. In
addition to implementing all the methods of
Attributes, it also defines various
set methods for setting attribute names, values,
and types, an addAttribute( ) method for adding a
new attribute to the end of the list, a removeAttribute(
) method for removing an attribute from the list, and a
clear( ) method for removing all attributes. Also,
there is an AttributesImpl( ) constructor that
initializes the new AttributesImpl object with a
copy of a specified Attributes object. This class
is useful for XMLFilter implementations that want
to filter the attributes of an element, or for
ContentHandler implementations that need to make
and save a copy of an Attributes object for later
use.
Figure 22-14. org.xml.sax.helpers.AttributesImpl
public class AttributesImpl implements org.xml.sax.Attributes { // Public Constructors public AttributesImpl( ); public AttributesImpl(org.xml.sax.Attributes atts); // Public Instance Methods public void addAttribute(String uri, String localName, String qName, String type, String value); public void clear( ); public void removeAttribute(int index); public void setAttribute(int index, String uri, String localName, String qName, String type, String value); public void setAttributes(org.xml.sax.Attributes atts); public void setLocalName(int index, String ...