andyHa/scireumOpen — pull request #3 by jmosser-NISC (2012-10-19 18:49:17+00:00)
Title: Implemented ability to match on more than the qName.

OK, trying the pull request again. This time with a much cleaner commit. :D

----------------------------------------
Andreas,
I happened across this project a couple of days ago and it fit a big need I have. I forked it and added some features to the XML handling classes. The primary new feature is the ability to match on all parts of an element's state.

See NodeHandlerKey and its usage in XMLReader#resolveNodeHandlers(...) method for the details.

I added a few other things as well:
* A stack containing the 'path to original root'
- Tracked by XMLReader and passed to the NodeHandler impl.
- Useful for building a sub-document in a NodeHandler.
* Ability to short-circuit document traversal
- Using a specific type of exception (not elegant but effective without a huge API refactoring).
* Optimizations to improve processing speed
- Added quick-returning tests in XMLReader to skip unneeded iteration attempts.
* Added ANT build script for compiling src and src-tests (ant -f scireumopen.xml)
* UnitTests for new classes & features
* JavaDoc addition and cleanup

I am not sure if you will like any of these changes, but I thought I would send a pull req just in case.

I would really like to express my thanks to you and your company for releasing an open version of this code. It has made my life easier and will improve my company's products greatly. I would also like to say that the design of the classes in the XML package was very easy to understand and I am a little ashamed I didn't think of it first :)

Best Regards,
Jason Mosser
Senior Software Engineer
National Information Solutions Cooperative
http://nisc.coop