我的XML看起來是這樣的:如何根據同一級別上的另一個節點更改XML節點的值?
<?xml version = "1.0" encoding = "utf-8"?>
<gallery>
<name>Rosie's Gallery</name>
<image>
<order>0</order>
<url>images/HappyIcon.jpg</url>
<title>Happy</title>
</image>
<image>
<order>1</order>
<url>images/SickIcon.jpg</url>
<title>Sick</title>
</image>
</gallery>
如果我提供給我的網址值,我怎麼會去改變相應的標題價值?我一直在試圖弄清楚,但我打了一個路障。
什麼碼你嘗試過,到目前爲止,什麼不順心? – 2012-03-06 21:35:10
爲什麼用WPF標記這個問題? – AngeloBad 2012-03-06 21:38:44
那麼我試圖使用像currentDoc.DocumentElement.SetAttribute(「image [url ='」+ imageLocation +「']」,「這裏的新url值」); 但它不喜歡路徑值。我希望有人知道如何做到這一點 – Blake 2012-03-06 21:40:30