Re: XMLNodes Error
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 69075
interpreted = N
texte = Maybe this fails when a user doesn't support cookies or turns them off? Yourequire cookies when you call the function. Or if you set multiple cookiesand they come back as a comma delimited list of cookies, that may mess upsetting the variables. Maybe log the var [xmlData] when it fails so you caninspect the XML to make sure it is properly formatted.Laters, Olin-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf OfClint DavisSent: Thursday, June 14, 2007 3:01 AMTo: WebDNA TalkSubject: XMLNodes ErrorI wrote functions to query UPS and USPS rates based on origin zip,destination zip, and weight. Recently, I started seeing some XMLNodes errorsin my ErrorLog.txt file. For 99% of my customers, there's no problem, butthe other 1% is getting the XMLNodes error message.Here's the error:An unknown error occurred:
XMLNodes
Container/Path Not Found:
USPSresHere's the code:[table name=shipOptions&fields=desc,price][/table][function name=uspsRates][text]crlf=[unurl]%0D%0A[/unurl][/text][text]uspsPounds=[middle startafter=&endbefore=.][weight][/middle][/text][text]uspsOunces=[format .0f][math][middlestartafter=.&endbefore=][weight][/middle]*0.16[/math][/format][/text][text]xmlData=
ALL [lookupdb=admin/usps_xml.db&lookinfield=SHR_ID&value=USPSXML&returnfield=SHR_ZIP¬found=] [destinationzip] [uspsPounds] [uspsOunces] REGULAR FALSE [/text][xmlparse var=USPSres][getchars start=1&trim=t][middle startafter=[url][/url]&endbefore=HTTP/1.1][TCPConnect host=Production.ShippingAPIs.com&port=80][TCPSend]GET /ShippingAPI.dll?API=RateV2&XML=[url][xmlData][/url]HTTP/1.0[crlf][!][/!]Host: Production.ShippingAPIs.com[crlf][!][/!]Content-type: text/html[crlf][!][/!]Content-length: [CountChars][xmlData][/CountChars][crlf][!][/!][crlf][!][/!][xmlData][crlf][!][/!][/TCPSend][!][/!][/TCPConnect][/middle][/getchars][/xmlparse][text]markup=[lookupdb=admin/usps_xml.db&lookinfield=SHR_ID&value=USPSXML&returnfield=SHR_MARKUP¬found=0][/text][xmlnodes ref=USPSres&path=named:RateV2Response/Package/] [text]desc=[/text] [text]price=[/text] [showif [url][name][/url]=Postage] [xmlnodes] [showif [url][name][/url]=MailService] [text]desc=[value][/text] [/showif] [showif [url][name][/url]=Rate] [text]price=[value][/text] [/showif] [showif [lookupdb=admin/usps_xml.db&lookinfield=SHR_NAME&value=[desc]&returnfield=SHR_ACTIVE¬found=N]=Y] [append table=shipOptions]desc=USPS[url][desc][/url]&price=[url][if"[markup]"="0"][then][price][/then][else][format..2f][math][price]+([price]*([markup]*0.01))[/math][/format][/else][/if][/url][/append] [/showif] [/xmlnodes] [/showif][/xmlnodes][/function][uspsRates destinationzip=[getcookie RealStoreZip]&weight=[getcookieRealStoreWeight]]-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Maybe this fails when a user doesn't support cookies or turns them off? Yourequire cookies when you call the function. Or if you set multiple cookiesand they come back as a comma delimited list of cookies, that may mess upsetting the variables. Maybe log the var [xmlData] when it fails so you caninspect the XML to make sure it is properly formatted.Laters, Olin-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf OfClint DavisSent: Thursday, June 14, 2007 3:01 AMTo: WebDNA TalkSubject: XMLNodes ErrorI wrote functions to query UPS and USPS rates based on origin zip,destination zip, and weight. Recently, I started seeing some XMLNodes errorsin my ErrorLog.txt file. For 99% of my customers, there's no problem, butthe other 1% is getting the XMLNodes error message.Here's the error:An unknown error occurred:
XMLNodes
Container/Path Not Found:
USPSresHere's the code:[table name=shipOptions&fields=desc,price][/table][function name=uspsRates][text]crlf=[unurl]%0D%0A[/unurl][/text][text]uspsPounds=[middle startafter=&endbefore=.][weight][/middle][/text][text]uspsOunces=[format .0f][math][middlestartafter=.&endbefore=][weight][/middle]*0.16[/math][/format][/text][text]xmlData= ALL [lookupdb=admin/usps_xml.db&lookinfield=SHR_ID&value=USPSXML&returnfield=SHR_ZIP¬found=] [destinationzip] [uspsPounds] [uspsOunces] REGULAR FALSE [/text][xmlparse var=USPSres][getchars start=1&trim=t][middle startafter=[url][/url]&endbefore=HTTP/1.1][TCPConnect host=Production.ShippingAPIs.com&port=80][tcpsend]GET /ShippingAPI.dll?API=RateV2&XML=[url][xmlData][/url]HTTP/1.0[crlf][!][/!]Host: Production.ShippingAPIs.com[crlf][!][/!]Content-type: text/html[crlf][!][/!]Content-length: [countchars][xmlData][/CountChars][crlf][!][/!][crlf][!][/!][xmlData][crlf][!][/!][/TCPSend][!][/!][/TCPConnect][/middle][/getchars][/xmlparse][text]markup=[lookupdb=admin/usps_xml.db&lookinfield=SHR_ID&value=USPSXML&returnfield=SHR_MARKUP¬found=0][/text][xmlnodes ref=USPSres&path=named:RateV2Response/Package/] [text]desc=[/text] [text]price=[/text] [showif [url][name][/url]=Postage] [xmlnodes] [showif [url][name][/url]=MailService] [text]desc=[value][/text] [/showif] [showif [url][name][/url]=Rate] [text]price=[value][/text] [/showif] [showif [lookupdb=admin/usps_xml.db&lookinfield=SHR_NAME&value=[desc]&returnfield=SHR_ACTIVE¬found=N]=Y] [append table=shipOptions]desc=USPS[url][desc][/url]&price=[url][if"[markup]"="0"][then][price][/then][else][format..2f][math][price]+([price]*([markup]*0.01))[/math][/format][/else][/if][/url][/append] [/showif] [/xmlnodes] [/showif][/xmlnodes][/function][uspsRates destinationzip=[getcookie RealStoreZip]&weight=[getcookieRealStoreWeight]]-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Olin Lagon"
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:
WebDNA Solutions --> Date format suggestions (1998)
DOS variable bug (was SandBox and ImageMagick) (2003)
Shownext from POST (2000)
writing db to disk (1997)
Hiding HTML and breaking the page (1997)
RE: E-mailer error codes (1997)
Creating 404 Not Found pages (1999)
Database formats (2003)
WebCatalog Technical Reference (1997)
Download Question (1997)
Search/sort in URL Was: GuestBook example (1997)
WebDNA Solutions ... sorry! (1997)
Smith Micro - no competition (2000)
This list needs a digest: rant, rave... (1997)
[WebDNA] multi hyperlinks in text paragraphs (2014)
Interfacing WebMerchant to www.fedex.com (1997)
Field name-subcategory (1997)
[WriteFile] problems (1997)
Is this possible, WebCat2.0 and checkboxes (1997)
Draft Manual, Tutorial, and more (1997)