Re: [WebDNA] xmlparse of POST

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111565
interpreted = N
texte = --Apple-Mail=_CDBD24AF-E632-4A18-939B-C2409973BE07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 If the XML is being posted TO your site then just look for the form = variable that it is being sent in. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 1 Sep 2014, at 9:47 am, Diane Blackmore wrote: > Hi >=20 > My code isn=92t broken - it was attached so you could see how the = method works when the POST is initiated from the page. My problem is = how to capture it when it ISN=92T initiated on the page, but rather just = sent directly to it. >=20 > In other words, how do I grab the XML itself as a variable to parse? >=20 > When it=92s initiated through the code supplied, the variable is set = by including the initiated post within the TEXT, but when this step is = required to be missed because I=92m not initiating it, I=92m confused as = to how I=92d pick it up. >=20 > Cheers, >=20 > >=20 > On 29/08/2014, at 5:21 pm, Stuart Tremain wrote: >=20 >> That looks like it should work, I don't know why you are doing the = 'actualresponse'. >>=20 >> Just do [xmlparse var=3Dxml_var1][RESPONSE][/xmlparse] >>=20 >> Just parse out the XML, if your response is all on one level, what = you have will work but if it is layered you will have to go deeper. >>=20 >>=20 >>=20 >> Regards >>=20 >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >> On 29 Aug 2014, at 2:15 pm, Diane Blackmore = wrote: >>=20 >>> Hi >>>=20 >>> I=92m ok with parsing a bunch of XML whereby the XML comes from a = POST request on the page itself (ie. the WebDNA code is generating the = request for the XML via a TCP/IP POST). >>>=20 >>> But what happens when the XML code is POST=92d at it from somewhere = else? How do I grab the XML to put it into a variable that can then be = parsed, nodes etc?? >>>=20 >>> Using WebDNA unix-Linux Intel Apache Module version 6.2.1 >>>=20 >>> Code I would usually use is (assume all variables have been assigned = before snip) >>>=20 >>> [text]crlf=3D[unurl]%0D%0A[/unurl][/text] >>> = [text]the_variables=3Dpaystation=3D_empty&pstn_pi=3D[pstn_pi]&pstn_gi=3D[p= stn_gi]&pstn_ms=3D[pstn_ms]&pstn_am=3D[pstn_am]&website=3D[justdomain][/te= xt] >>>=20 >>> [text]Response=3D[TCPConnect = host=3Dwww.paystation.co.nz&port=3DXXX&ssl=3DT][tcpsend skipheader=3DT][!]= >>> [/!]POST /direct/paystation.dll HTTP/1.1[crlf][!] >>> [/!]Referer: http://[justdomain][thisURL][crlf][!] >>> [/!]Host: www.paystation.co.nz[crlf][!] >>> [/!]Content-Type: application/x-www-form-urlencoded[crlf][!] >>> [/!]Content-length: = [countchars][the_variables][/countchars][crlf][!] >>> [/!]Connection: close[crlf][!] >>> [/!][crlf][!] >>> [/!][the_variables][crlf][!] >>> [/!][/tcpsend][/TCPConnect][/text] >>>=20 >>>=20 >>> [text show=3Dt]actualresponse=3D[listwords = words=3D[response]&delimiters=3D<][showif = [index]>1][delimiter][word][/showif][/listwords][/text] >>> =09 >>> [xmlparse var=3Dxml_var1][actualresponse][/xmlparse] >>>=20 >>> [xmlnodes ref=3Dxml_var1&path=3Dnamed:InitiationRequestResponse] >>> [text secure=3Df][name]=3D[value][/text] >>> [/xmlnodes] >>>=20 >>>=20 >>> So that=92s all fine, as long as I initiate from the page - I need = to know how to grab the xml contents if its POST=92d from somewhere = else. >>>=20 >>> My thanks in advance. >>>=20 >>> Cheers, >>>=20 >>> >>>=20 >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >=20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail=_CDBD24AF-E632-4A18-939B-C2409973BE07 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 If the = XML is being posted TO your site then just look for the form variable = that it is being sent in.


Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 1 Sep 2014, at 9:47 am, Diane Blackmore <diane@cohesion.co.nz> = wrote:

Hi

My code isn=92t broken - it = was attached so you could see how the method works when the POST is = initiated from the page.  My problem is how to capture it when it = ISN=92T initiated on the page, but rather just sent directly to = it.

In other words, how do I grab the XML = itself as a variable to parse?

When it=92s = initiated through the code supplied, the variable is set by including = the initiated post within the TEXT, but when this step is required to be = missed because I=92m not initiating it, I=92m confused as to how I=92d = pick it up.

Cheers,

<CohesionSig_Diane12.gif>

On 29/08/2014, at 5:21 pm, Stuart Tremain <webdna@idfk.com.au> = wrote:

That = looks like it should work, I don't know why you are doing the = 'actualresponse'.

Just do [xmlparse = var=3Dxml_var1][RESPONSE][/xmlparse]

Just parse = out the XML, if your response is all on one level, what you have will = work but if it is layered you will have to go = deeper.



Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 29 Aug 2014, at 2:15 pm, Diane Blackmore <diane@cohesion.co.nz> = wrote:

Hi

I=92m ok with parsing a bunch = of XML whereby the XML comes from a POST request on the page itself (ie. = the WebDNA code is generating the request for the XML via a TCP/IP = POST).

But what happens when the XML code is = POST=92d at it from somewhere else? How do I grab the XML to put it into = a variable that can then be parsed, nodes = etc??

Using WebDNA unix-Linux Intel = Apache Module version 6.2.1

Code I would = usually use is (assume all variables have been assigned before = snip)

[text]crlf=3D[unurl]%0D%0A[/unurl][/te= xt]
[text]the_variables=3Dpaystation=3D_empty&pstn_pi=3D[pst= n_pi]&pstn_gi=3D[pstn_gi]&pstn_ms=3D[pstn_ms]&pstn_am=3D[pstn_= am]&website=3D[justdomain][/text]

[text]Respo= nse=3D[TCPConnect host=3Dwww.paystation.co.nz&port=3D= XXX&ssl=3DT][tcpsend skipheader=3DT][!]
[/!]POST = /direct/paystation.dll HTTP/1.1[crlf][!]
[/!]Host: www.paystation.co.nz[crlf][!]
[/!]Content-Type: = application/x-www-form-urlencoded[crlf][!]
[/!]Content-length: = [countchars][the_variables][/countchars][crlf][!]
[/!]Connection= : = close[crlf][!]
[/!][crlf][!]
[/!][the_variables][crlf]= [!]
[/!][/tcpsend][/TCPConnect][/text]

=
[text show=3Dt]actualresponse=3D[listwords = words=3D[response]&delimiters=3D<][showif = [index]>1][delimiter][word][/showif][/listwords][/text]
=
[xmlparse = var=3Dxml_var1][actualresponse][/xmlparse]

[xmlno= des = ref=3Dxml_var1&path=3Dnamed:InitiationRequestResponse]
[text= = secure=3Df][name]=3D[value][/text]
[/xmlnodes]
<= br>

So that=92s all fine, as long as I initiate = from the page - I need to know how to grab the xml contents if its = POST=92d from somewhere else.

My thanks in = advance.

Cheers,

<CohesionSig_Diane12.gif>

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_CDBD24AF-E632-4A18-939B-C2409973BE07-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] xmlparse of POST (Diane Blackmore 2014)
  2. Re: [WebDNA] xmlparse of POST (Tom Duke 2014)
  3. Re: [WebDNA] xmlparse of POST (Stuart Tremain 2014)
  4. Re: [WebDNA] xmlparse of POST (Diane Blackmore 2014)
  5. Re: [WebDNA] xmlparse of POST (Stuart Tremain 2014)
  6. Re: [WebDNA] xmlparse of POST (Diane Blackmore 2014)
  7. Re: [WebDNA] xmlparse of POST (Stuart Tremain 2014)
  8. [WebDNA] xmlparse of POST (Diane Blackmore 2014)
--Apple-Mail=_CDBD24AF-E632-4A18-939B-C2409973BE07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 If the XML is being posted TO your site then just look for the form = variable that it is being sent in. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 1 Sep 2014, at 9:47 am, Diane Blackmore wrote: > Hi >=20 > My code isn=92t broken - it was attached so you could see how the = method works when the POST is initiated from the page. My problem is = how to capture it when it ISN=92T initiated on the page, but rather just = sent directly to it. >=20 > In other words, how do I grab the XML itself as a variable to parse? >=20 > When it=92s initiated through the code supplied, the variable is set = by including the initiated post within the TEXT, but when this step is = required to be missed because I=92m not initiating it, I=92m confused as = to how I=92d pick it up. >=20 > Cheers, >=20 > >=20 > On 29/08/2014, at 5:21 pm, Stuart Tremain wrote: >=20 >> That looks like it should work, I don't know why you are doing the = 'actualresponse'. >>=20 >> Just do [xmlparse var=3Dxml_var1][RESPONSE][/xmlparse] >>=20 >> Just parse out the XML, if your response is all on one level, what = you have will work but if it is layered you will have to go deeper. >>=20 >>=20 >>=20 >> Regards >>=20 >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >> On 29 Aug 2014, at 2:15 pm, Diane Blackmore = wrote: >>=20 >>> Hi >>>=20 >>> I=92m ok with parsing a bunch of XML whereby the XML comes from a = POST request on the page itself (ie. the WebDNA code is generating the = request for the XML via a TCP/IP POST). >>>=20 >>> But what happens when the XML code is POST=92d at it from somewhere = else? How do I grab the XML to put it into a variable that can then be = parsed, nodes etc?? >>>=20 >>> Using WebDNA unix-Linux Intel Apache Module version 6.2.1 >>>=20 >>> Code I would usually use is (assume all variables have been assigned = before snip) >>>=20 >>> [text]crlf=3D[unurl]%0D%0A[/unurl][/text] >>> = [text]the_variables=3Dpaystation=3D_empty&pstn_pi=3D[pstn_pi]&pstn_gi=3D[p= stn_gi]&pstn_ms=3D[pstn_ms]&pstn_am=3D[pstn_am]&website=3D[justdomain][/te= xt] >>>=20 >>> [text]Response=3D[TCPConnect = host=3Dwww.paystation.co.nz&port=3DXXX&ssl=3DT][tcpsend skipheader=3DT][!]= >>> [/!]POST /direct/paystation.dll HTTP/1.1[crlf][!] >>> [/!]Referer: http://[justdomain][thisurl][crlf][!] >>> [/!]Host: www.paystation.co.nz[crlf][!] >>> [/!]Content-Type: application/x-www-form-urlencoded[crlf][!] >>> [/!]Content-length: = [countchars][the_variables][/countchars][crlf][!] >>> [/!]Connection: close[crlf][!] >>> [/!][crlf][!] >>> [/!][the_variables][crlf][!] >>> [/!][/tcpsend][/TCPConnect][/text] >>>=20 >>>=20 >>> [text show=3Dt]actualresponse=3D[listwords = words=3D[response]&delimiters=3D<][showif = [index]>1][delimiter][word][/showif][/listwords][/text] >>> =09 >>> [xmlparse var=3Dxml_var1][actualresponse][/xmlparse] >>>=20 >>> [xmlnodes ref=3Dxml_var1&path=3Dnamed:InitiationRequestResponse] >>> [text secure=3Df][name]=3D[value][/text] >>> [/xmlnodes] >>>=20 >>>=20 >>> So that=92s all fine, as long as I initiate from the page - I need = to know how to grab the xml contents if its POST=92d from somewhere = else. >>>=20 >>> My thanks in advance. >>>=20 >>> Cheers, >>>=20 >>> >>>=20 >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >=20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail=_CDBD24AF-E632-4A18-939B-C2409973BE07 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 If the = XML is being posted TO your site then just look for the form variable = that it is being sent in.


Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 1 Sep 2014, at 9:47 am, Diane Blackmore <diane@cohesion.co.nz> = wrote:

Hi

My code isn=92t broken - it = was attached so you could see how the method works when the POST is = initiated from the page.  My problem is how to capture it when it = ISN=92T initiated on the page, but rather just sent directly to = it.

In other words, how do I grab the XML = itself as a variable to parse?

When it=92s = initiated through the code supplied, the variable is set by including = the initiated post within the TEXT, but when this step is required to be = missed because I=92m not initiating it, I=92m confused as to how I=92d = pick it up.

Cheers,

<CohesionSig_Diane12.gif>

On 29/08/2014, at 5:21 pm, Stuart Tremain <webdna@idfk.com.au> = wrote:

That = looks like it should work, I don't know why you are doing the = 'actualresponse'.

Just do [xmlparse = var=3Dxml_var1][RESPONSE][/xmlparse]

Just parse = out the XML, if your response is all on one level, what you have will = work but if it is layered you will have to go = deeper.



Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 29 Aug 2014, at 2:15 pm, Diane Blackmore <diane@cohesion.co.nz> = wrote:

Hi

I=92m ok with parsing a bunch = of XML whereby the XML comes from a POST request on the page itself (ie. = the WebDNA code is generating the request for the XML via a TCP/IP = POST).

But what happens when the XML code is = POST=92d at it from somewhere else? How do I grab the XML to put it into = a variable that can then be parsed, nodes = etc??

Using WebDNA unix-Linux Intel = Apache Module version 6.2.1

Code I would = usually use is (assume all variables have been assigned before = snip)

[text]crlf=3D[unurl]%0D%0A[/unurl][/te= xt]
[text]the_variables=3Dpaystation=3D_empty&pstn_pi=3D[pst= n_pi]&pstn_gi=3D[pstn_gi]&pstn_ms=3D[pstn_ms]&pstn_am=3D[pstn_= am]&website=3D[justdomain][/text]

[text]Respo= nse=3D[TCPConnect host=3Dwww.paystation.co.nz&port=3D= XXX&ssl=3DT][tcpsend skipheader=3DT][!]
[/!]POST = /direct/paystation.dll HTTP/1.1[crlf][!]
[/!]Referer: [thisurl][crlf][">http://[justdomain][thisurl][= crlf][!]
[/!]Host: www.paystation.co.nz[crlf][!]
[/!]Content-Type: = application/x-www-form-urlencoded[crlf][!]
[/!]Content-length: = [countchars][the_variables][/countchars][crlf][!]
[/!]Connection= : = close[crlf][!]
[/!][crlf][!]
[/!][the_variables][crlf]= [!]
[/!][/tcpsend][/TCPConnect][/text]

=
[text show=3Dt]actualresponse=3D[listwords = words=3D[response]&delimiters=3D<][showif = [index]>1][delimiter][word][/showif][/listwords][/text]
=
[xmlparse = var=3Dxml_var1][actualresponse][/xmlparse]

[xmlno= des = ref=3Dxml_var1&path=3Dnamed:InitiationRequestResponse]
[text= = secure=3Df][name]=3D[value][/text]
[/xmlnodes]
<= br>

So that=92s all fine, as long as I initiate = from the page - I need to know how to grab the xml contents if its = POST=92d from somewhere else.

My thanks in = advance.

Cheers,

<CohesionSig_Diane12.gif>

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_CDBD24AF-E632-4A18-939B-C2409973BE07-- Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Grepping URL-Encoded Text (2004) A note for NT4 users (1998) OT: Way off-topic: Qmail and Linux (2003) emailer (1997) creating a 60 fields database (1997) Cart Unique After Rolling Back Time? (2001) UK credit card info follow-up (1997) problems with WebCat-Plugin (1997) Loop code problem (2000) tcpconnect and ftp (2002) Date sorting (2000) problems with 2 tags (1997) authenticating a second user, the sequel (1997) Date Calulation (1997) Wanted: More Math Functions (or, Can You Solve This?) (1997) pulling URL information (2003) [WebDNA] Amazon EC2 (2009) Grep Help (2007) [WebDNA] making a gift cert. (in effect) it's own lineitem/'product' (2008) Shipcost lookup? (1997)