How to modify XML node value?

前端 未结 2 1148
一生所求
一生所求 2021-02-04 21:18

I am new developer in java application. I would like to modify an XML file node value. I have used an xml file for modify as follows

  
            


        
相关标签:
2条回答
  • 2021-02-04 21:39

    First you have to realize that node.setValue() is modifying the representation that is stored in memory. Knowing that, then you just need to figure out how to write that output to disk. See this, for an example.

    0 讨论(0)
  • 2021-02-04 21:45
    node.Text = "Enter your value here"; //This will work 
    
    0 讨论(0)
提交回复
热议问题