Silverlight XML Save does not overwrite the entire file

orareeduams

New Member
The best way to explain my problem is by a example.I have a Xml file with some elements in it. When I remove a element, I save the file again and this problem occurs:Before save\[code\] <?xml version="1.0" encoding="utf-8"?><ElementTree> <Elements1 /> <Elements2> <Element Name="TestElement" ID="4efa7cc9-a89a-429b-81f4-b00cde729f24" /> </Elements2> <Elements3 /></ElementTree>\[/code\]After save\[code\]<?xml version="1.0" encoding="utf-8"?><ElementTree> <Elements1 /> <Elements2 /> <Elements3 /></ElementTree>D="4efa7cc9-a89a-429b-81f4-b00cde729f24" /> </Elements2> <Elements3 /></ElementTree>\[/code\]What I suspect it is doing: It keeps writing the text untill it has reached the end of the text to be saved and then it stops. It does not remove the text that is still writen in the file AFTER the last character in the stream.How can I fix this?
 
Back
Top