I'm relatively new to working with XML and am working with some rather large documents using the javax.xml.parsers.SAXParser
.
The thing is: The information I need is near the top of the XML file and I don't need to parse the entire document. -- What is the "best" way to stop parsing a file when the relevant information has been identified?
(So far the only way I can think of is to throw an exception.)