Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top