当前位置: 代码迷 >> XML/SOAP >> 生成XML文档的时候怎么生成注释
  详细解决方案

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

热度:698   发布时间:2012-02-04 15:43:09.0
生成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\""); 
  相关解决方案