Hi Zief,
There is nothing in your code that should introduce a carriage return,
though don't know what happens in Compact Framework. The expected value
should be <Movement_Date></Movement_Date>. Are you sure the carriage
return is introduced here and not later on by some formatting of the xml?
On Thu, 02 Nov 2006 10:41:54 +0100, Zief <zieftech@gmail.comwrote:
Quote:
Hi,
>
I am having a strange problem that is probably very easy to correct.
This is using the Compact Framework for Windows Mobile if that makes
any difference.
>
I am changing some text of an XmlNode that has some data, to "". The
original line in the file looks like:
<Movement_Date>26/10/2006</Movement_Date>
>
When I set aNode.InnerXml = "" I would expect:
<Movement_Date />
but instead I get:
<Movement_Date>
</Movement_Date>
>
later when this is read by a different program, it picks up the
carriage return, and not null data, and therefore generates an error.
I have also tried aNode.InnerXml = string.Empty and
aNode.RemoveAll();
>
with the same results. I assume it is just a setting somewhere, but I
can't find where?
>
Zief
>
--
Happy Coding!
Morten Wennevik [C# MVP]