Helper classes

A parser developer may choose to write classes that implement the interfaces described above, and add further useful methods. As before, the standard includes some recommendations for helper classes. All the helpers defined for SAX 1.0 are retained for backward compatibility, but several new ones have been added to support the new interfaces.

Attributes implementation

The AttributesImpl helper class has the following constructors and methods. It implements the Attributes interface and adds methods for creating, removing and changing the name, value or type of an attribute.

Constructors:

attributesImpl();

attributesImpl(Attributes atts);

Additional methods:

 void setAttribute(int index, String uri, String localName, String qName, ...

Get XML Companion, The, Third 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.