> (But how do you tell SAX "hey, I've found it, you can stop > processing now?" -- do you have to throw an exception)?
Yes. Or use custom parser features such as Xerces' XNI Incremental Parsing capability. Or let the parser finish spinning its way through the file, which is wasteful but doesn't risk throwing an exception that the preceeding stage may not know how to handle. Note that unless whoever defined that PI put constraints on where it may appear, you may have to parse your way through the whole document.
