yes, that is what i am exactly doing right now
(loading complete jaxb object and the query java style and filter it afterward)
but i was just interested whether such a lookahead is possible, because it happens quite often that you need some information of xml-children nodes when working on the events and don't want to unnecessarily parse to jaxb objects.
the jaxb-stream style works quite well on my machine. having a monster export file (~900MB) and iterating ~200K items takes only 90 seconds.
reason i used jaxb:
-quite big and complicated schema (couldn't bother to fiddle around with xpath or other queries)
-i need to traverse a lot of data from one xml entry inside java
-xjc to generate jaxb-classes out from xsd was quite smooth