I want to convert an xml element like this:
<asin>?B0013FRNKG?</asin>?
to string in javascript
I used XMLSerializer
:
new XMLSerializer().serializeToString(xml);
the string only shows on alert() and in the console. On the page it just says
[object Element][object Element]
I want to get the string.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…