Re: [WebDNA] XML Help
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103619
interpreted = N
texte = Skip the [writefile] (which you - by mistake? - already have done by =20commenting out) step and feed the [xml_result] to the [xmlparse], like:[xmlparse var=3Dxml_var1][include file=3Dxml_response][xml_result]Best,Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se12 sep 2009 kl. 00.12 skrev Mark Bergkvist:> Ok, here is what I have to write the response to a variable:>> [text]xml_result=3D[middle startafter=3D&endbefore=3D]> [tcpconnect host=3Dnewport.ingrammicro.com&port=3D443&ssl=3DT]> [tcpsend skipheader=3DT][!]> [/!]POST /mustang HTTP/1.0[crlf][!]> [/!]Host: [host][crlf][!]> [/!]Content-Length: [CountChars][content][/CountChars][crlf][!]> [/!][crlf][!]> [/!][content][!]> [/!][/tcpsend]> [/tcpconnect][/middle][/text]>> [!][writefile file=3Dxml_response][xml_result][/writefile][/!]>>> [xmlparse var=3Dxml_var1][include =file=3Dxml_response][/xmlparse]> [xmlnodes ref=3Dxml_var1&path=3Dnamed:PNAResponse]> [name]=3D[value]
> [xmlnodes]> - [name]=3D[value]
>> [/xmlnodes]> [/xmlnodes]>> What I am seeing now in the browser is:>> Fatal Error at file> line: 1> column: 1> message: Invalid document structure> An unknown error occurred:> XMLNodes> Container/Path Not Found:> xml_var1>> Any idea if I am missing something here?>> Mark>> From: Kenneth Grome [mailto:kengrome@gmail.com]> Sent: Friday, September 11, 2009 5:47 PM> To: talk@webdna.us> Subject: Re: [WebDNA] XML Help>> > How would I save it directly into the XMLParse context?>>> Put the tcpconnect inside the xmlparse context, or in the xmlparse =20> tag itself -- I forgot which but it's in the docs.>>> On the other hand your code will be clearer and easier to understand =20=> if you just save the tcpconnect response as a text variable then use =20=> that variable in the xmlparse context.>>> Sincerely,> Ken Grome>>
Associated Messages, from the most recent to the oldest:
Skip the
[writefile] (which you - by mistake? - already have done by =20commenting out) step and feed the [xml_result] to the
[xmlparse], like:[xmlparse var=3Dxml_var1][include file=3Dxml_response][xml_result]Best,Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se12 sep 2009 kl. 00.12 skrev Mark Bergkvist:> Ok, here is what I have to write the response to a variable:>>
[text]xml_result=3D[middle startafter=3D&endbefore=3D]> [tcpconnect host=3Dnewport.ingrammicro.com&port=3D443&ssl=3DT]> [tcpsend skipheader=3DT]
[!]> [/!]POST /mustang HTTP/1.0[crlf]
[!]> [/!]Host: [host][crlf]
[!]> [/!]Content-Length:
[countchars][content][/CountChars][crlf]
[!]> [/!][crlf]
[!]> [/!][content]
[!]> [/!][/tcpsend]> [/tcpconnect][/middle][/text]>>
[!][writefile file=3Dxml_response][xml_result][/writefile][/!]>>> [xmlparse var=3Dxml_var1][include =file=3Dxml_response][/xmlparse]> [xmlnodes ref=3Dxml_var1&path=3Dnamed:PNAResponse]> [name]=3D[value]
>
[xmlnodes]> - [name]=3D[value]
>> [/xmlnodes]> [/xmlnodes]>> What I am seeing now in the browser is:>> Fatal Error at file> line: 1> column: 1> message: Invalid document structure> An unknown error occurred:> XMLNodes> Container/Path Not Found:> xml_var1>> Any idea if I am missing something here?>> Mark>> From: Kenneth Grome [mailto:kengrome@gmail.com]> Sent: Friday, September 11, 2009 5:47 PM> To: talk@webdna.us> Subject: Re: [WebDNA] XML Help>> > How would I save it directly into the XMLParse context?>>> Put the tcpconnect inside the xmlparse context, or in the xmlparse =20> tag itself -- I forgot which but it's in the docs.>>> On the other hand your code will be clearer and easier to understand =20=> if you just save the tcpconnect response as a text variable then use =20=> that variable in the xmlparse context.>>> Sincerely,> Ken Grome>>
Christer Olsson
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:
Word search (1997)
Strange Form Occurrence on Log In Pages (2005)
japanese characters (1997)
WebCat2b12 - New features for 1.6 users ... (1997)
IPTC to Image (2004)
Issue with plug-in Webcat, webstar 4.x, SSL and IE when using the backbuttom (2000)
[append] vs. [appendfile] delta + question? (1997)
Authorize.net questions ... (2003)
Comments in db? (1997)
Virtual hosting and webcatNT (1997)
Re:webCatalog and Stocks (1998)
tpl pages in dreamweaver (2000)
CommandSecurity? (1997)
Summing fields (1997)
New Mac Public Beta Available (1997)
Bulk Processing Offline (2004)
RE: [movefile] (1999)
Odd error in logs (1998)
Yet another db manager (2003)
[BoldWords] WebCat.acgib15Mac (1997)