Re: LINQ and XML for compact framework
On May 1, 2:21 pm, Wan <luo...@gmail.c omwrote:
<snip>
Okay, now we're getting somewhere. I can see three possible reasons to
start with:
1) It might not be finding the MessageStaus element
2) It might be finding the MessageStaus element but failing to change
the value properly
3) It might not be able to save the file back to disk
4) It might be throwing an exception, which you're silently swallowing
Try putting some kind of alert (e.g. a MessageBox.Show or
Console.WriteLi ne) in the foreach loop, to check for condition 1.
Try saving something totally different (e.g. a new XElement) to disk
to check for condition 3.
Try putting an alert in your catch block to check for condition 4.
Jon
On May 1, 2:21 pm, Wan <luo...@gmail.c omwrote:
<snip>
Actual Output has nothing changed. However, if I created a normal
framework console application project. And copy, paste this code, it
will do the job. That's why I want to ask how to use LINQ to modify
XML in compact framework.
framework console application project. And copy, paste this code, it
will do the job. That's why I want to ask how to use LINQ to modify
XML in compact framework.
start with:
1) It might not be finding the MessageStaus element
2) It might be finding the MessageStaus element but failing to change
the value properly
3) It might not be able to save the file back to disk
4) It might be throwing an exception, which you're silently swallowing
Try putting some kind of alert (e.g. a MessageBox.Show or
Console.WriteLi ne) in the foreach loop, to check for condition 1.
Try saving something totally different (e.g. a new XElement) to disk
to check for condition 3.
Try putting an alert in your catch block to check for condition 4.
Jon
Comment