I have an xml file that looks like:
<root>
<application-key>ABC2349293493</application-key>
...
..
</root>
The xml file is rather large, and I only need to get the application-key to see if this request should be rate limited.
My server is getting pounded, so I need a way to rate limit requests without having to read the entire xml.
DOM is out of the question because of the memory footprint.
I am happy with SAX, but with xerces you are not able to stop processing of the xml since it is a push model. The only way I know so far is the throw an exception.
Do any of the other sax libraries support exiting early gracefully?