How to I output org.w3c.dom.Element to string format in java?

前端 未结 7 690
旧巷少年郎
旧巷少年郎 2020-11-27 13:01

I have an org.w3c.dom.Element object passed into my method. I need to see the whole xml string including its child nodes (the whole object graph). I am looking

7条回答
  •  旧巷少年郎
    2020-11-27 14:00

    Not supported in the standard JAXP API, I used the JDom library for this purpose. It has a printer function, formatter options etc. http://www.jdom.org/

提交回复
热议问题