Changing node name of xml-node with Java

后端 未结 5 1557
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-30 05:42

I have following scenario: I have a XML-Document, e.g. like this



    

        
5条回答
  •  -上瘾入骨i
    2020-12-30 06:22

    Just call setName("reallyCoolTag") on the element(s) you want to rename. There is no need to copy the children around; the name attribute of an element is a mutable field.

提交回复
热议问题