开发者

How to call setTextContent in android

开发者 https://www.devze.com 2023-03-09 11:56 出处:网络
I want to re write xml file using jdom, i got some example in goodle, they used setTextContent to append value in xml tag. but android is not supporting node.setTextContent. instead of this what is th

I want to re write xml file using jdom, i got some example in goodle, they used setTextContent to append value in xml tag. but android is not supporting node.setTextContent. instead of this what is the key word for accessing setTextContent. if anyone did this issue p开发者_如何学Pythonls let me know.


There are no xxxTextContent() methods in org.w3c.dom.Element.

A Text Node is just like any other node in xml. You'll need to find the Text node child of your element, and use setNodeValue().

Something like this:

node.getFirstChild().setNodeValue(newValue);
0

精彩评论

暂无评论...
验证码 换一张
取 消