Document document = (Document) delegate._delegate;
printer.setVersion(document.getXmlVersion());
if (document.getXmlStandalone()){
printer.setStandalone("yes");
}
printer.printXml(document);
}
else
{
printer.printXml((org.w3c.dom.Node) delegate._delegate);
}