Reputation: 85452
I need to hook into an API that receives a StAX XMLStreamReader
as the input, and filter the supplied stream (change the value of a certain attribute from true to false).
Looked at StreamReaderDelegate
, but with that one I'd have to do a lot of coding to keep track of all access paths to the attribute in question.
Is there a better way?
Thanks in advance!
Upvotes: 0
Views: 1286
Reputation: 61568
With StAX, you could use the event API instead and utilize the EventReaderDelegate. The amount of code would be roughly the same though. Using delegates is also the recommended solution, so I'm afraid, there is no significantly better way.
Upvotes: 1