當創建一個XML文檔的區別是什麼(如果有的話)添加文本元素的這兩種方法:差異
Element el = document.createElement("element");
el.setTextContent("This is the text content");
和
Element el = document.createElement("element");
Text txt = document.createTextNode("This is the text content");
el.appendChild(txt);