I have to remove DTD from 2 GB XML file , i have used below code for that , but i have getting system out of memory exception. even though there 16 GB RAM on server /
XmlDocument XDoc = new XmlDocument();
xmlDoc.XmlResolver = null ;
XDoc.Load(Dts.Variables["D:\\xmlfiles\\old.xml"].Value.ToString());
XmlDocumentType XDType = XDoc.DocumentType;
XDoc.RemoveChild(XDType);
XDoc.Save(Dts.Variables["D:\\xmlfiles\\new.xml"].Value.ToString());
Is there other way to remove DTD, pls help on this ..