Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Remove DTD from XML file using SSIS script Task

$
0
0

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 ..

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>