Rajath
Rajath

Reputation: 215

How to clone attributes of a SAX Parser

While using SAX Parser in Java, we have attributes as one of the parameters in the startElement method.

Can someone please let me know how to clone this attributes so that it can be stored in a HashMap<String, Attributes>.

Upvotes: 1

Views: 333

Answers (1)

Shane Voisard
Shane Voisard

Reputation: 1145

new AttributesImpl(Attributes atts)

Copy an existing Attributes object. This constructor is especially useful inside a startElement event.

Upvotes: 2

Related Questions