Assign an namespace to an XML document without loading the XML



We are working with very large XML files at our company (100 Mb to 3 Gb and more). Now, the documents that are delivered to our system out delivered without a namespace, which are system cannot handle, we do need a namespace in the document.


What we do currently is loading the XML document and through an XLST transformation we're setting the namesapce.


Off course, loading a Xml Document through the following code:



loadedDoc.LoadXml(xmlData);


takes a very long time when using files that are that large. In the past, we were dealing with rather small files so it was never an issue.


Does anybode knows a solution on how I can set a namespace in an XML document in the most performant way?


Kind regards


No comments:

Post a Comment