Using dom4j and SAXReader - how to abort gracefullly parsing

J

jim

I'm processing the file with an ElementHandler. The file could be big.

At some point, I decide I'm done and don't want to continue.

Neither on the onStart or onEnd methods of ElementHandler can throw an
Exception. I can throw an Error but that doesn't seem to be the right
way to do it to me.

I don't see any way of telling the parser to just stop and wrap it up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top