|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
receive xml from https post in classic ASP
I am writing an ASP page which is listening and waiting to receive a xml from third party vendor. I have googled for a while. It seems to me in ASP page, if the vendor stores xml data in a field, say, XmltoTis, then I can do the following.(please check for me if my understanding is right :=) InputXMLValue=Request("XmltoTis") Set objXMLDoc=Server.CreateObject("Microsoft.XMLDOM") objXMLDoc=InputXMLValue ''from here I can start to parse the xml data, right Set IncomeInfoRoot=objXMLDoc.documentElement Set DescNode=IncomeInfoRoot.selectSingleNode("totalPayment") Response.Write DescNode.Text & "<br>" .... what about if they store xml in the body, what should I do in classic ASP. I saw in .net discussion forum, people can use Request.InputStream, but not sure how can I deal with it in asp, not see this kind of discussion. Can you shed a light on me? Thanks. -- Betty Show quote
"c676228" <bettys@community.nospam> wrote in message This :-news:51B3D0A5-57D3-48F5-8D9D-0C4F37AF5E6D@microsoft.com... > Hi all, > > I am writing an ASP page which is listening and waiting to receive a xml > from third party vendor. I have googled for a while. It seems to me in ASP > page, if the vendor stores xml data in a field, say, XmltoTis, then I can do > the following.(please check for me if my understanding is right :=) > InputXMLValue=Request("XmltoTis") > Set objXMLDoc=Server.CreateObject("Microsoft.XMLDOM") > objXMLDoc=InputXMLValue > ''from here I can start to parse the xml data, right > Set IncomeInfoRoot=objXMLDoc.documentElement > Set DescNode=IncomeInfoRoot.selectSingleNode("totalPayment") > Response.Write DescNode.Text & "<br>" > ... > > what about if they store xml in the body, what should I do in classic ASP. I > saw > in .net discussion forum, people can use Request.InputStream, but not sure > how can I deal with it in asp, not see this kind of discussion. > Can you shed a light on me? > Thanks. objXMLDoc=InputXMLValue should be:- objXMLDoc.LoadXML InputXMLValue If the XML is posted directly as the entity body of the request (as it should) then use:- objXMLDoc.Load Request -- Anthony Jones - MVP ASP/ASP.NET Anothony,
Thank you so much for the post. It's very helpful. Your name is very familiar to me. I am pretty sure that you helped some of my former threads too. No wonder your MVP for microsoft. Sincerely -- Betty Show quote "Anthony Jones" wrote: > "c676228" <bettys@community.nospam> wrote in message > news:51B3D0A5-57D3-48F5-8D9D-0C4F37AF5E6D@microsoft.com... > > Hi all, > > > > I am writing an ASP page which is listening and waiting to receive a xml > > from third party vendor. I have googled for a while. It seems to me in ASP > > page, if the vendor stores xml data in a field, say, XmltoTis, then I can > do > > the following.(please check for me if my understanding is right :=) > > InputXMLValue=Request("XmltoTis") > > Set objXMLDoc=Server.CreateObject("Microsoft.XMLDOM") > > objXMLDoc=InputXMLValue > > ''from here I can start to parse the xml data, right > > Set IncomeInfoRoot=objXMLDoc.documentElement > > Set DescNode=IncomeInfoRoot.selectSingleNode("totalPayment") > > Response.Write DescNode.Text & "<br>" > > ... > > > > what about if they store xml in the body, what should I do in classic ASP. > I > > saw > > in .net discussion forum, people can use Request.InputStream, but not sure > > how can I deal with it in asp, not see this kind of discussion. > > Can you shed a light on me? > > Thanks. > > This :- > > objXMLDoc=InputXMLValue > > should be:- > > objXMLDoc.LoadXML InputXMLValue > > If the XML is posted directly as the entity body of the request (as it > should) then use:- > > objXMLDoc.Load Request > > -- > Anthony Jones - MVP ASP/ASP.NET > > > |
|||||||||||||||||||||||