Last night I played with StAX, the new streaming XML parser API. I am impressed with the performance and ease of use. There are some weirdness in the API though. For example, check out these overloaded methods:
writeStartElement(String name);
writeStartElement(String ns, String name)
writeStartElement(String prefix, String name, String ns)
writeEmptyElement() is similarly overloaded , but writeAttribute() is not.
writeAttribute(String name, String value)
writeAttribute(String ns, String name, String value)
writeAttribute(String prefix, String ns, String name, String value)
All I can say is this parameter order scrambling doesn't make sense to me.
BTW, I am building up a set of useful StAX functions and hope to share it with others soon. For example, skipElement and exitElement are pretty handy for skipping over an element or exiting from within an element.