using System;
using System.Xml;
public class Test
{
public static void Main()
{
XmlDocument xd = new XmlDocument();
xd.LoadXml(@"<xml xml:space=""preserve""><data> </data></xml>");
XmlNode xn = xd.DocumentElement.SelectSingleNode("data");
string data = xn.InnerText; // data == " "
Console.WriteLine(data == " "); //True
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uWG1sOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCSAgICAgICAgWG1sRG9jdW1lbnQgeGQgPSBuZXcgWG1sRG9jdW1lbnQoKTsKICAgICAgICB4ZC5Mb2FkWG1sKEAiPHhtbCB4bWw6c3BhY2U9IiJwcmVzZXJ2ZSIiPjxkYXRhPiA8L2RhdGE+PC94bWw+Iik7CiAgICAgICAgWG1sTm9kZSB4biA9IHhkLkRvY3VtZW50RWxlbWVudC5TZWxlY3RTaW5nbGVOb2RlKCJkYXRhIik7CiAgICAgICAgc3RyaW5nIGRhdGEgPSB4bi5Jbm5lclRleHQ7IC8vIGRhdGEgPT0gIiAiCiAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoZGF0YSA9PSAiICIpOyAvL1RydWUKCgl9Cn0=