how to display xml in javascript?

后端 未结 7 1030
春和景丽
春和景丽 2020-12-09 00:29

As the question says, it just escaped my memory how to display xml in javascript, I want to display some source xml within an div on a page, that sits next to the processed

7条回答
  •  暖寄归人
    2020-12-09 01:35

    This is the easiest way I found to display XML as Text on the same page for copy and paste:

    var xml = document.getElementById('svg_element').innerHTML;
    document.getElementById('svg_pre').innerText = xml; 
    

提交回复
热议问题