ebandiera Posted November 29, 2012 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now