eroror reading xml

Posted by Hiren009 under ASP.NET AJAX on 9/25/2011 | Points: 10 | Views : 1038 | Status : [Member] | Replies : 1
Hi, I have some problem while reading xml in asynchronous way.

Let me explain some background. We have one project related to stock market. Here we are having 3rd party service by which we receive latest data in XML format every 7 to 10 millisecond. Each XML received in response has size nearly 500 to 700 kb. Now my task is to read that xml and display output to the users every 7 to 1o millisecond.

Now, my problem is that whenever i try to read xml some times it works fine and some time it gives error. I have debugged and find out problem, whenever i am reading xml and i am in the middle of the process, same time 3rd party api updates that xml and it becomes invalid xml.

I don't have any control over API events and xml, reason for this is because api writes xml in binded textbox asynchronously, and i am reading that xml from textbox asynchronously. Here, i can't use locks too, and even can't change time period of API response.

Waiting for your replay,

Hiren Patel


Posted by: Vuyiswamb on: 9/29/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Your Solution is to take the xml and store it in a Catche and let your Application read it from there , when there is a new one do like wise ., fetch store it in the catch.

Thank you for posting at Dotnetfunda

Hiren009, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response