Name

The AttributesImpl Class

Synopsis

AttributesImpl is a default implementation of the Attributes interface that SAX parsers and filters may use. Besides the methods of the Attributes interface, this class offers manipulator methods so the list of attributes can be modified or reused. These methods allow you to take a persistent snapshot of an Attributes object in startElement( ) and construct or modify an Attributes object in a SAX driver or filter:

package org.xml.sax.helpers;
     
public class AttributesImpl implements Attributes {
     
    public AttributesImpl(  );
    public AttributesImpl(Attributes atts);
     
    public int    getLength(  );
    public String getURI(int index);
    public String getLocalName(int index);
    public String getQName(int index);
    public String getType(int index);
    public String getValue(int index);
    public int    getIndex(String uri, String localName);
    public int    getIndex(String qualifiedName);
    public String getType(String uri, String localName);
    public String getType(String qualifiedName);
    public String getValue(String uri, String localName);
    public String getValue(String qualifiedName);
    public void   clear(  );
    public void   setAttributes(Attributes atts);
    public void   addAttribu
                     te(String uri, String localName,
     String qualifiedName, String type, String value);
    public void   setAttribute(int index, String uri, String localName,
     String qualifiedName, String type, String value);
    public void   removeAttribute(int index)
    public void   setURI(int index, String uri)
    public void   setLocalName(int index, String ...

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.