生成XML文档的时候怎么生成注释

生成XML文档的时候如何生成注释比如在生成的时候,要在顶上加上XML code?xml-stylesheet typetext/xsl

生成XML文档的时候如何生成注释
比如

在生成的时候,要在顶上加上 

XML code
<?xml-stylesheet type="text/xsl" title="XSL Formatting" href="show.xsl" media="all"?>


这句如何生成呢?谢谢

我使用的是JAVA

[解决办法]
DOM4J
XML code
        Document document = DocumentHelper.createDocument();        document.addProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" title=\"XSL Formatting\" href=\"show_new_final.xsl\" media=\"all\"");