StAX seems to be a pulling parser (like SAX but without inversion of control). But I didn't find the equivalent of python's expandNode which is what I was interested in in the first place, I don't care about inversion of control.
For开发者_JAVA技巧 those who don't know pulldom, it's a S(t)AX parser where at any point you can obtain the current subtree as a DOM Node.
The Java approach seems to be that either you get streaming or DOM parser but not both; while python allows mixing the two.
精彩评论