re: Stopping XML parsing in mid-stream?

Michael Chang <[email protected]>
Newsgroups gmane.text.xml.sax.general
Message-ID <[email protected]>
>  > So, essentially, I need a way to get parse() to return after it has seen a 
>  > closing root node.
> 
> Throw an exception -- that's the way SAX was designed to work:
> 
>   public class StopParsingException extends SAXException
>   {
>     ...
>   }

Except that, when reading from my InputStream, no exceptions are ever thrown;
parse() just keeps on reading and reading and reading.  An exception *is*
thrown once I forcefully close the connection on the server end, but that's
obviously not a workable solution :)



> David

Michael


-- 
/* BEGIN SIG 
*
* "Afraid of change, afraid of staying the same,
*  when temptation calls, we just look away."
*  - Barenaked Ladies
*
* "He started writing in mirror writing, 'Help! I'm
*  trapped behind the world.'"
*  - New York State Journal of Medicine
*
*-----------------------------
* Michael Chang
* [email protected]
* http://www.syndetic.org/
*/



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
List: [email protected]
See:  http://www.saxproject.org
https://lists.sourceforge.net/lists/listinfo/sax-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.