Trying to use the DOMParser with node js

前端 未结 7 1446
忘了有多久
忘了有多久 2020-12-01 10:17

I am running into issues when trying to use the DOMParser in my js code. In my code, I retrieve an xml file via xmlhttp.responseText soap response. I want to be able to ac

7条回答
  •  囚心锁ツ
    2020-12-01 10:40

    var DOMParser = require('xmldom').DOMParser;
    var doc = new DOMParser().parseFromString(
        '\n'+
            '\ttest\n'+
            '\t\n'+
            '\t\n'+
        ''
        ,'text/xml');
    

提交回复
热议问题