Convert XML to String and append to page

前端 未结 6 1203
清酒与你
清酒与你 2020-12-08 07:31

I want to convert an xml element like this:

​B0013FRNKG​

to string in java

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 08:00

    Did you try enclosing the result like in…

    (new XMLSerializer()).serializeToString(xml)
    

    Also, I'd use console instead to see the content better:

    console.log((new XMLSerializer()).serializeToString(xml));
    

提交回复
热议问题