ebandiera 0 Posted November 29, 2012 Report Share Posted November 29, 2012 (edited) Hello, I have a little problem...I have a XML in a string variable, with Entity References. And I need to convert this string into a XMLDocument variable. private void button3_Click(object sender, EventArgs e) { XmlDocument envXML = new XmlDocument(); XmlTextWriter xtw = new XmlTextWriter("C:\\Users\\myname\\Desktop\\noisquevoa3.xml", Encoding.UTF8); string sLine = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<root Id=\"ID11\">" + "<Campo>Apostrofe: ' Sinal: < Enter: Feito" + "</Campo>" + "</root>"; //envXML.PreserveWhitespace = true; doenst work envXML.LoadXml(sLine); envXML.WriteTo(xtw); xtw.Close(); } The code above is merely illustrative (this forum replaced some caracters). The real code is attached. The problem: When I call the LoadXml method, my entity disappears...My entity ' still working... Please, any help is awesome Edit: C# code. CODE_W3.txt Edited November 30, 2012 by ebandiera Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.