PDA

View Full Version : Parse XML with asp


dude9er
06-30-2007, 01:47 AM
OKay, I am starting to doubt that this is even possible. I've been at it for two days now and have gotten no where.

I have a form that is submitting to a remote server that I do not control. I am told to POST the form data to http://www.somesite.com/Process.aspx and that POST will generate an XML string that I am suppose to parse within my own site for the user to view.

Here is the problem. If I'm POSTing to http://www.somesite.com/Process.aspx how do I get the user back to my site AND parse the XML string? This makes no sense to me, is it even possible?

Here is what I'm being told:

"The HTTP POST method generates an XML string that contains information about the success or failure or your request. The XML string will need to be parsed by your application in order to interpret the results."

I am given a sample of the response string, but no actual response.XML file to point to. Not only that, by the time the response is generated the user is on the remote server completely via the POST. How can I get them back to my server and show the results? I thought of using an Iframe, but I don't think this will work.

Please advise if this is even possible. I'm using ASP and I am a designer without a lot of experience in the coding world. I'm going to be buying some books because I know I need to learn this stuff!!

Thanks for any feedback!!

ez4me2c3d
07-26-2007, 05:41 AM
Let me see if this example makes since to you...and I don't even know what you are trying to do so... bare with me...

Example:
I run a web server that has a web page with a sole purpose. This web page looks at POST/GET data sent to it in a request. It expects the name=value pairs to be of a certain format. (i.e., email=john.doe@site.com, name=John%20Doe, item=Basketball, etc.)

My page then attempts to e-mail Mr. Doe at the value stored in 'email' with a message that says: "Dear Mr. John Doe, Thank you for your recent purchase of Basketball." (Sounds cheesy, I know!)

Then, if the action succeeded, I can then send a request back to the referrer (that's the site that lead the user to my site) with a POST/GET of the returned results: success OR failure.

The referring site can look at the POST/GET data and tell the customer that his purchase was either a success or a failure.

SO! Make sure you are submitting the form items in the right format, and make sure you know what to expect back from the remote site. You will need a server side technology (e.g., PHP, ASP, etc.) to read the GET/POST data. Well, I suppose you could read the GET data with JavaScript quite easily. But I digress!

Hope that helped a little.