如何更新XML文件中元素对应的值
现有一个xml文件:
<?xml version="1.0" encoding="utf-16"?>
<componentDocuments>
<componentDocument Version="1.0">
<header>
<flow ID="GOGOGO" nodeID="Begin" >
<fileName>xml/workflows/SignOnFlow.xml </fileName>
<declares />
<sequence outcome="" />
</flow>
<returnStack />
<index>1 </index>
</header>
</componentDocument>
</componentDocuments>
现在想把 <fileName>元素下对应的值xml/workflows/SignOnFlow.xml变为c:\AAA\xml\workflows\SignOnFlow.xml并更新到 <fileName>元素下,即变为新的xml文件:
<?xml version="1.0" encoding="utf-16"?>
<componentDocuments>
<componentDocument Version="1.0">
<header>
<flow ID="GOGOGO" nodeID="Begin" >
<fileName>c:\AAA\xml\workflows\SignOnFlow.xml </fileName>
<declares />
 
相关问答:
txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......
已知文件1.xml和数据文件db.xml,如何用java编写程序,得出2.xml文件?
1.已知xml文件 1.xml结构如下:
<cs>
<cs name="cs1" details="This is cs1" country="China&q ......
<?xml version="1.0"?>
<root>
<status>433</status>
<msg>这个是汉字</msg>
<serialno>123</serialno>
</root>
如何用ASP读取 status值 ......
<XML>
<FLAG>1</FLAG>
<REASON></REASON>
<ADVERT><ADID>64</ADID><ADNAME>英皇娱乐四</ADNAME><ADCONTENT>内容一</ADCONTENT><ADT ......
string b = "";
b = System.Guid.NewGuid().ToString();//获得会话ID
//写XML
XmlDocument xml = new XmlDocumen ......