saxReader.setContentHandler(handler);
saxReader.parse(new InputSource(in));
}
private ContentHandler createSerializer(final Writer out) {
final ContentHandler serializer = new StringSerializer() {
public void endDocument() throws SAXException {
super.endDocument();
try {
out.write(this.toString());