White line spaces in xml while using the File Stream
<p><BR/>
I'm having an XML which will look like following<BR/></p>

<pre><code>&lt;root&gt;
    &lt;node&gt;
        &lt;a1&gt;text&lt;/a1&gt;
        &lt;a2&gt;text&lt;/a2&gt;
        &lt;a3&gt;&lt;/a3&gt;
    &lt;/node&gt;
&lt;/root&gt;
</code></pre>

<p>If i loaded this in a xmldocument and saved it. The xml becomes following</p>

<pre><code>&lt;root&gt;
    &lt;node&gt;
        &lt;a1&gt;text&lt;/a1&gt;
        &lt;a2&gt;text&lt;/a2&gt;
        &lt;a3&gt;
        &lt;/a3&gt;
    &lt;/node&gt;
&lt;/root&gt;
</code></pre>

<p>My code snippet:</p>

<pre><code> public static Void Update(String Path)
        {
            FileStream docIn = new FileStream(Path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
            XmlDocument xml = new XmlDocument();
            xml.Load(Path);
            XmlNodeList nodeY = xml.SelectNodes("/root/node/a1");
            _count = 0;
            foreach (XmlNode live in nodeY)
            {
              //changing nodeY InnerText
            }

            xml.Save(Path);

        }
</code></pre>

<p>I do not wish to use the preservewhitespace= true option since it makes my xml looks like this </p>

<pre><code>&lt;root&gt;&lt;node&gt;&lt;a1&gt;text&lt;/a1&gt;&lt;a2&gt;text&lt;/a2&gt;&lt;a3&gt;&lt;/a3&gt;&lt;/node&gt;&lt;/root&gt;
</code></pre>

<p>Thanks in advance!!!</p>
