How to print pretty xml in javascript?

后端 未结 5 722
你的背包
你的背包 2021-01-13 23:07

What\'s the best way to pretty-print xml in JavaScript? I obtain xml content through ajax call and before displaying this request in textarea i want to format it so it looks

5条回答
  •  长发绾君心
    2021-01-13 23:35

    I agree with Arjan on utilizing the

     tags.  I was trying to decipher 'ugly' xml code in my html output before I tried this out about 2 days ago.  Makes life much easier and keeps you sane. 

提交回复
热议问题