Re: [WebDNA] XML Help please

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 101892
interpreted = N
texte = Well, I have it on a page that's hit by a trigger once a day...for starters, this assumes you have a directory called "includes" at the root of the site to write those files, so if you don't that will give you a bunch of errors right off the bat. On Feb 3, 2009, at 1:37 PM, Michael A. DeLorenzo wrote: > Gill, > > Thanks for posting the code. I gave it a go. Do you just put this > on a page > and hit it with a browser? I get a bunch of errors when I do that. > Are there > specific parms or setup I need to use the code? > > Thanks, > Mike > > > -----Original Message----- > From: Gil Poulsen [mailto:gil@altimac.com] > Sent: Tuesday, February 03, 2009 12:38 PM > To: talk@webdna.us > Subject: Re: [WebDNA] XML Help please > > Does this help at all? It's the Fed, not the European Central Bank, > but it gets the exchange rates I need and writes them to include > files, although it could be easily modified to write to a database or > whatever... > > [TCPConnect host=www.ny.frb.org&port=80] > [text show=F]ex_rates=[TCPSend skipheader=T]GET /markets/fxrates/ > FXtoXML.cfm?FEXdate=[year]%2D[month]%2D[day]%2000%3A00%3A00% > 2E0&FEXtime=1200 HTTP/1.0[unURL]%0D%0A%0D%0A[/unURL][/TCPSend][/text] > [/TCPConnect] > > > [showIf [ex_rates]^frbny:] > > > [text show=F]ex_rates=[grep search=frbny:&replace=][ex_rates][/grep][/ > text] > > [xmlparse var=xml_rates][ex_rates][/xmlparse] > > [loop start=1&end=23] > [xmlnode ref=xml_rates&var=series&path=named:UtilityData/DataSet/ > Series([index])] > [showIf [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value] > [/xmlnodes]=AUD][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > AUD.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=USD][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/CAD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > CAD.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=EUR][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > EUR.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=NZD][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > NZD.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=GBP][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > GBP.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][/xmlnode] > [/loop] > > [/showIf] > > On Feb 3, 2009, at 6:58 AM, Colin Sidwell wrote: > >> Hi, >> >> On the off chance, has anyone written any code to parse this feed >> from the >> European Central Bank? >> >> http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml >> >> I want to just get the USD exchange rate out of it. >> >> I did some XML code before but it took about 2 days to get it >> working :-( >> >> >> Regards, >> >> Colin >> >> >> >> All services are subject to our terms & conditions, a copy of which >> can be >> found on our web site at http://www.idealinternet.co.uk/ >> --------------------------------------------------------- >> 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 >> old archives: http://dev.webdna.us/TalkListArchive/ >> > > -- > Gil Poulsen, Mac Wirehead > > ************************ > AltiM@c Consulting > 23 Marco Polo Court > Franklin Park, NJ 08823-1703 > Voice: 609-359-0103 > http://altimac.com > ************************ > > > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > > > > > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > -- Gil Poulsen, Mac Wirehead ************************ AltiM@c Consulting 23 Marco Polo Court Franklin Park, NJ 08823-1703 Voice: 609-359-0103 http://altimac.com ************************ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] XML Help please (Colin Sidwell 2009)
  2. Re: [WebDNA] XML Help please (Gil Poulsen 2009)
  3. Re: [WebDNA] XML Help please (Gil Poulsen 2009)
  4. Re: [WebDNA] XML Help please (Gil Poulsen 2009)
  5. RE: [WebDNA] XML Help please ("Michael A. DeLorenzo" 2009)
  6. RE: [WebDNA] XML Help please ("Michael A. DeLorenzo" 2009)
  7. Re: [WebDNA] XML Help please (Colin Sidwell 2009)
  8. Re: [WebDNA] XML Help please (Colin Sidwell 2009)
  9. Re: [WebDNA] XML Help please (Gil Poulsen 2009)
  10. Re: [WebDNA] XML Help please (Toby Cox 2009)
  11. [WebDNA] XML Help please (Colin Sidwell 2009)
Well, I have it on a page that's hit by a trigger once a day...for starters, this assumes you have a directory called "includes" at the root of the site to write those files, so if you don't that will give you a bunch of errors right off the bat. On Feb 3, 2009, at 1:37 PM, Michael A. DeLorenzo wrote: > Gill, > > Thanks for posting the code. I gave it a go. Do you just put this > on a page > and hit it with a browser? I get a bunch of errors when I do that. > Are there > specific parms or setup I need to use the code? > > Thanks, > Mike > > > -----Original Message----- > From: Gil Poulsen [mailto:gil@altimac.com] > Sent: Tuesday, February 03, 2009 12:38 PM > To: talk@webdna.us > Subject: Re: [WebDNA] XML Help please > > Does this help at all? It's the Fed, not the European Central Bank, > but it gets the exchange rates I need and writes them to include > files, although it could be easily modified to write to a database or > whatever... > > [TCPConnect host=www.ny.frb.org&port=80] > [text show=F]ex_rates=[TCPSend skipheader=T]GET /markets/fxrates/ > FXtoXML.cfm?FEXdate=[year]%2D[month]%2D[day]%2000%3A00%3A00% > 2E0&FEXtime=1200 HTTP/1.0[unurl]%0D%0A%0D%0A[/unURL][/TCPSend][/text] > [/TCPConnect] > > > [showIf [ex_rates]^frbny:] > > > [text show=F]ex_rates=[grep search=frbny:&replace=][ex_rates][/grep][/ > text] > > [xmlparse var=xml_rates][ex_rates][/xmlparse] > > [loop start=1&end=23] > [xmlnode ref=xml_rates&var=series&path=named:UtilityData/DataSet/ > Series([index])] > [showIf [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value] > [/xmlnodes]=AUD][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > AUD.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=USD][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/CAD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > CAD.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=EUR][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > EUR.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=NZD][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > NZD.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][showIf > [xmlnodes ref=series&path=named:Key&name=CURR&exact=T][value][/ > xmlnodes]=GBP][showIf [xmlNodeAttributes][name]/[value] [/ > xmlNodeAttributes]^UNIT/USD][xmlnodes > ref=series&path=named:Obs&name=OBS_VALUE&exact=T][writeFile /includes/ > GBP.inc][value][/writeFile][/xmlnodes][/showIf][/showIf][/xmlnode] > [/loop] > > [/showIf] > > On Feb 3, 2009, at 6:58 AM, Colin Sidwell wrote: > >> Hi, >> >> On the off chance, has anyone written any code to parse this feed >> from the >> European Central Bank? >> >> http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml >> >> I want to just get the USD exchange rate out of it. >> >> I did some XML code before but it took about 2 days to get it >> working :-( >> >> >> Regards, >> >> Colin >> >> >> >> All services are subject to our terms & conditions, a copy of which >> can be >> found on our web site at http://www.idealinternet.co.uk/ >> --------------------------------------------------------- >> 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 >> old archives: http://dev.webdna.us/TalkListArchive/ >> > > -- > Gil Poulsen, Mac Wirehead > > ************************ > AltiM@c Consulting > 23 Marco Polo Court > Franklin Park, NJ 08823-1703 > Voice: 609-359-0103 > http://altimac.com > ************************ > > > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > > > > > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > -- Gil Poulsen, Mac Wirehead ************************ AltiM@c Consulting 23 Marco Polo Court Franklin Park, NJ 08823-1703 Voice: 609-359-0103 http://altimac.com ************************ Gil Poulsen

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:

Questions To Answer (1997) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) Happy New year (2004) getchars broken? (1997) [ShowCart] and GET vs. POST (1997) flushing databases (2003) PIXO support (1997) WebDNA Solutions ... (1997) RE: combining strings (1997) b12 cannot limit records returned and more. (1997) [WebDNA] sandboxes etc (2009) show all problem (1997) question: webmerchant connection (1997) ConvertChars? (1998) WebCat2b15MacPlugin - [protect] (1997) Great product and great job ! (1997) [WebDNA] IIS 7.5 (2015) WC2b15 File Corruption (1997) Getting total number of items ordered (1997) So many lookers, hey smith micro (2003)