G
G.
This is an obvious bug in the String.Replace function:
//load a XML string into a document
XmlDocument doc = new XmlDocument();
doc.LoadXml("<test id='' />");
//Obtain the string again...Converts my '' to ""...strange, but ok.
String strXML = doc.OuterXml;
//trying to convert back the single quotes to double quotes
String strNewXML = strXML.Replace("\"","'");
//BUG the resulting string is : <test id=" />
//The Replace string with "" is scrambled to a single "
Can anyone explain how I can work around this???
StringBuilder does the same thing.
I need to convert "" to '' in the string.
Hard to believe they have basic bugs like this...
no wonder no one is using .NET.
//load a XML string into a document
XmlDocument doc = new XmlDocument();
doc.LoadXml("<test id='' />");
//Obtain the string again...Converts my '' to ""...strange, but ok.
String strXML = doc.OuterXml;
//trying to convert back the single quotes to double quotes
String strNewXML = strXML.Replace("\"","'");
//BUG the resulting string is : <test id=" />
//The Replace string with "" is scrambled to a single "
Can anyone explain how I can work around this???
StringBuilder does the same thing.
I need to convert "" to '' in the string.
Hard to believe they have basic bugs like this...
no wonder no one is using .NET.