You're asking for random access to XML documents and partial parsing. You aren't likely to find any XML parser that does that.
But you mentioned a database. It should be easy to do what you ask, if you get the data directly through
JDBC. It's just the XML part that is getting in the way.