String str = "<?xml version=\"1.0\"?><!DOCTYPE foo[<!ELEMENT foo ANY> <!ENTITY word \"A\">]><foo>&word;</foo>"; System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument(); xDoc.LoadXml(str); xDoc.Save(@"C:\Temp\xdoc.xml");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)