Page is a not externally linkable
httpwebwitch - 8:11 pm on Oct 9, 2008 (gmt 0)
* * * so. what is returned from getCurrency("CAD") ? I don't see anything glaringly wrong with the function. Nothing obvious anyways. debugging tip: inject little debugging one-liner commands into your script and echo out variables to see what their values are. for instance, echo out "objItem.childNodes( 0 ).text" and see if it is what you expect. It may be something as simple as a bad boundary limit in the Mid() or Left() string functions. Also, you may consider using a regular expression to extract the data instead of awkwardly nested substring functions.
for the benefit of the group
river_east is scraping data out of an XML node that looks like this: <title>1 USD = CAD (1.124512)</title>
Then echo out "Mid( objItem.childNodes( 0 ).text, 1, 11 )". Take the code in little chunks and verify that it's doing everything right from top to bottom.