网上查的都试了很多都不行 我现在有一个xml我要对其中指定的节点
比如:<?xml version="1.0" encoding="UTF-8"?>
<ipe><ipq>
<ip>192.168.10.184</ip>
<ceshi>0</ceshi>
</ipq><ipq>
<ip>192.168.10.100</ip>
<ceshi>1</ceshi>
</ipq><ipq>
<ip>192.168.10.136</ip>
<ceshi>0</ceshi>
</ipq><ipq>
<ip>192.168.10.119</ip>
<ceshi>1</ceshi>
</ipq><ipq>
<ip>192.168.10.120</ip>
<ceshi>1</ceshi>
</ipq>
</ipe>
我现在想修改<ipq>
<ip>192.168.10.119</ip>
<ceshi>1</ceshi>
</ipq>
里面测试内容 这个怎么做
比如:<?xml version="1.0" encoding="UTF-8"?>
<ipe><ipq>
<ip>192.168.10.184</ip>
<ceshi>0</ceshi>
</ipq><ipq>
<ip>192.168.10.100</ip>
<ceshi>1</ceshi>
</ipq><ipq>
<ip>192.168.10.136</ip>
<ceshi>0</ceshi>
</ipq><ipq>
<ip>192.168.10.119</ip>
<ceshi>1</ceshi>
</ipq><ipq>
<ip>192.168.10.120</ip>
<ceshi>1</ceshi>
</ipq>
</ipe>
我现在想修改<ipq>
<ip>192.168.10.119</ip>
<ceshi>1</ceshi>
</ipq>
里面测试内容 这个怎么做
当你读到id值为192.168.10.119的时候,再修改对应的ceshi节点就可以了,既然能读能写,还有什么做不到的,无非就是加些判断罢了。。