Reading xml stream using C#?
Started on: 04 December 12
Participants: 1
I am getting xml stream from an application. How to parse that stream directly and how to load it to dataset?
[WebInvoke(UriTemplate = "UpdateFile/{id}", Method = "POST")] public bool UpdateTestXMLFile(string id, Stream createdText) { string filenamewithpath = System.Web.HttpContext.Current.Server.MapPath(@"~/files/" + id+".xml"); System.IO.File.WriteAllBytes(filenamewithpath, Util.ReadFully(createdText)); }
[WebInvoke(UriTemplate = "UpdateFile/{id}", Method = "POST")] public bool UpdateTestXMLFile(string id, Stream createdText) { string filenamewithpath = System.Web.HttpContext.Current.Server.MapPath(@"~/files/" + id+".xml"); System.IO.File.WriteAllBytes(filenamewithpath, Util.ReadFully(createdText)); }
This challenge is listed under
Development & Implementations
Community
Related Posts:
1 Suggestion
You can parse your XML stream using XML reader, go to http://msdn.microsoft.com/en-us/library/cc189056(v=vs.95).aspx for detailed steps.