let htmlStr = fs.readFileSync(__dirname + '/data.xml', 'utf8')
htmlStr = htmlStr
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/\n/g, '')
let itemArr = []
htmlStr.replace(/<item(([\s\S])*?)<\/item>/g, (word) => {
console.log(word)
itemArr.push(word)
return word
})
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12