Reputation: 49
In a loop, each time i need to parse a new xml and in xml i have to parse some specific nodes, if they has value then copy them to another file else keep going until the last xml, how to do it ?
Upvotes: 1
Views: 448
Reputation: 163587
The essence of Sax is that you don't own the flow of control: when you say "in a loop", you are hinting that you want the flow of control. With Sax, the parser calls you when it's ready to do so. If you want to be in control, try using a pull parser (Stax, for example Woodstox).
Upvotes: 1