Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
XML and Related Technologies
SAX Parser How to break once i get required values
Sanjay Ra
Ranch Hand
Posts: 31
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am using a SAX Parser (xerces) .
I dont need to parse the entire XML and would like to stop parsing once i get certain values.
How could i do this?
thanks
Sanjay
Lasse Koskela
author
Posts: 11962
5
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You could just throw some custom RuntimeException and catch it outside the call to parse(). Certainly not too pretty but at least it works.
Author of
Test Driven
(2007) and
Effective Unit Testing
(2013) [
Blog
] [
HowToAskQuestionsOnJavaRanch
]
Sanjay Ra
Ranch Hand
Posts: 31
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
is this the only way ?
thanks!
Sanjay
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Parsing XML string using Java Program
what is dtd and dft?
reading xml data
How to get XML file name ?
how sax parser is installed or JAR FILE OF SAX API
More...