How to read modify fragments of XML using StAX in Java?
问题 My goal is to read objects (featureMember) into DOM, change them and write back into new XML. XML is too big to use DOM itself. I figured what I need is StAX and TransformerFactory, but I can't make it work. This is what I've done till now: private void change(File pathIn, File pathOut) { try { XMLInputFactory factory = XMLInputFactory.newInstance(); XMLOutputFactory factoryOut = XMLOutputFactory.newInstance(); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf