XML : API that returns XML. Can I use XmlTextWriter and would this be faster than creating an XmlDocument

Currently writing an .ashx file that returns some XML. Here is what I am essentially doing in the ProcessRequest sub

  Dim xml As XmlDocument = getXML(context.Request.QueryString("products"))  xml.Save(context.Response.Output)    

I was wondering if I could also somehow use an XmlTextWriter and if so would this be better/faster?

Speed is by far the most important factor but I'm very new to programming in VB.net so if there's anything else I should know that would be useful please let me know.

No comments:

Post a Comment