O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required