normalize()


normalize() 方法移除空的文本节点,并连接相邻的文本节点。对元素进行正规化:

xmlDoc.getElementById("demo").normalize();