I have a requirement where in I am processing some XML on server in a web application
Assume there is a button on a asp.net page. When the user clicks the button, I call a function say button_click() -> which in turns calls some service method to process XML.
Problem scenario::
Now lets say I am processing the XML and I am done with 50% of the processing. I notice that I have to get confirmation of user since some value in the XML is invalid. At this point I want to show a prompt to user to say yes or no ( may be a javascript prompt ) and then:
1. if the user clicks OK -> I want to continue processing the remaining 50% of the XML
2. if the user clicks NO -> I want to stop processing and display an error message.
After lot of trial and error and my knowledge of developing web application, I felt that there is no way to do this, unless I start execution of my service again with some flags when the user clicks OK. But my colleagues are not convinced and they say there must be a way to do that and I lack the knowledge for it. Its quiet an interesting problem.
**NOTE : We are actually porting an existing desktop application into web hence the problem of dialog boxes !
I request you to kindly help me regarding this experts ! Also I would like to know is there any other way to do handle such scenarios ?
EDIT : Adding more info.
Actually what I mean here by XML processing is every user has some XML created by server using a WINDOWS service. When the user clicks on some button , we have to process that XML and if everything is correct, we have to call third party service and get results and update the DB.
What happens sometimes is, the WINDOWS service that creates the XML puts some invalid values ( we cant correct them since its not under our control ) . So, we need to get a confirmation to the user that some values are invalid and if he wants to proceed. In this way we want to be doubly sure that we are sending invalid values by the consent of user. The problem is we identify the value is invalid sometimes at the end of the XML file (we cant change this) , so we dont want to process the XMl once again !