How to convert org.jdom.Document to String

后端 未结 2 1012
予麋鹿
予麋鹿 2021-01-01 09:46

How do I to convert an org.jdom.Document to a String in Java?

相关标签:
2条回答
  • 2021-01-01 10:25
    new XMLOutputter().outputString(doc);
    
    0 讨论(0)
  • 2021-01-01 10:32

    I got the answer myself

    XMLOutputter xmOut = new XMLOutputter(); 
    System.out.println("----" + xmOut.outputString(doc));
    
    0 讨论(0)
提交回复
热议问题