static String toXmlText(InterfaceDocument feed) { return "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + feed.xmlText(new XmlOptions().setUseDefaultNamespace().setSavePrettyPrint()); }
static void addStylesheet(InterfaceDocument feed) { XmlCursor cursor = feed.newCursor(); cursor.toNextToken(); cursor.insertProcInst("xml-stylesheet", "type='text/xsl' href='feed.xsl'"); }