我有一些字符串,其中一些xml驻留.
字符串是:
string xmlRead = "<ns0:RequestedAmount xmlns:ns0=\"http://tempuri.org/XMLSchema.xsd\"> <ns0:RequestedAmount></ns0:RequestedAmount> </ns0:RequestedAmount>" +
"<ns0:Response xmlns:ns0=\"http://tempuri.org/XMLSchema.xsd\"> <ns0:Response/> </ns0:Response>" +
"<ns0:isValid xmlns:ns0=\"http://tempuri.org/XMLSchema.xsd\"> <ns0:isValid/> </ns0:isValid>";
Run Code Online (Sandbox Code Playgroud)
我试过这个:
string s=xmlRead.Replace(@"\","");
string s=xmlRead.Replace("\"","");
string s=xmlRead.Replace(@"\",string.Empty);
Run Code Online (Sandbox Code Playgroud)
什么都没有帮助我帮助我在这里做错了什么.