XML Document to String

前端 未结 3 1399
余生分开走
余生分开走 2020-11-27 02:44

What\'s the simplest way to get the String representation of a XML Document (org.w3c.dom.Document)? That is all nodes will be on a single line.

As an ex

3条回答
  •  萌比男神i
    2020-11-27 03:35

    Use the Apache XMLSerializer

    here's an example: http://www.informit.com/articles/article.asp?p=31349&seqNum=3&rl=1

    you can check this as well

    http://www.netomatix.com/XmlFileToString.aspx

提交回复
热议问题