المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Compact framework: how to read and write to a XML file



C# Programming
02-17-2010, 02:21 AM
Hi,

i got a AppSettings.exe.xml to read and write to. it looks like this:
</span span class="code-SummaryComment"version/spanspan class="code-keyword"="/spanspan class="code-keyword"1.0"/span span class="code-SummaryComment"encoding/spanspan class="code-keyword"="/spanspan class="code-keyword"utf-8"/span span class="code-SummaryComment"?/spanspan class="code-SummaryComment">
reading frm xml is not of a problem. but writing is..
everytime i write to the xml, the last char will get trim off.

for example if i wanna write or append, the xml will look like this
</span span class="code-SummaryComment"version/spanspan class="code-keyword"="/spanspan class="code-keyword"1.0"/span span class="code-SummaryComment"encoding/spanspan class="code-keyword"="/spanspan class="code-keyword"utf-8"/span span class="code-SummaryComment"?/spanspan class="code-SummaryComment"> <span class="code-keyword">