I need to transform a XML. Usually I would use Saxon and a XSLT 2.0 stylehsheet for this. The transformations I have to do involve side-effects and are stateful and manipulate the contens of nodes, so implementing a XPath function doesn't make that much sense.
I decided to implement a transformer class for this purpose. I found javax.xml.transform
provides a standard interface for this, but is targeted towards implementing a XSLT processor (it requires a TransformerFactory
and Transformer
for each transformation) and seems complex and unnecessary for my purpose.
Is there a general XML (DOM) transformation interface which I could use instead of inventing my own?