public void serialize(PullProvider in, OutputStream out) throws XPathException, IOException {
Properties props = new Properties();
props.setProperty(OutputKeys.METHOD, "xml");
props.setProperty(OutputKeys.INDENT, "yes");
SerializerFactory sf = config.getSerializerFactory();
Receiver receiver = sf.getReceiver(new StreamResult(out),
in.getPipelineConfiguration(),
props);
new PullPushCopier(in, receiver).copy();
}