Quantcast
Viewing all articles
Browse latest Browse all 2439

createElementした直後の要素の状態

javaでXMLドキュメントにルート要素を作成するとき、以下のような感じで書くと思いますが Document document = new XMLDocument(); Element rootElement = document.createElement("hoge"); document.appendChild(rootElement); このとき、createElementの直後(appendChildする前)のrootElementはどういう状態にあるのでしょうか? documentのchildとしてappendされていないので、「浮いた」状態(OwnerDocumentは決まっているが、DOMツリーの根でも枝でも葉でもない?)なのでしょうか。

Viewing all articles
Browse latest Browse all 2439

Trending Articles