I am going to create an XML element in JavaScript to exchange data with server side. I found I can do it with document.createElement
. But I do not know how to convert it to string. Is there any API in browser to make it easier? Or is there any JS library including this API?
EDIT: I found that browser API XMLSerializer, it should be the right way to serialize to string.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…