I’m trying to navigate an XML tree but can’t seem to get the trace value to equate to the first item attribute title.
var currency:XML =<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:cb="http://centralbanks.org/cb/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3c.org/1999/02/22-rdf-syntax-ns#rdf.xsd">
<item rdf:about="http://www.bankofcanada.ca/rss/fx/noon/iexe5902.xml">
<title>CA: 2.1254 VEF</title>
<link>http://www.bankofcanada.ca/fx/daily_noon.html</link>
<description>1 Canadian Dollar = 2.1254 VEF (VEF = Venezuelan bolivar fuerte). These are the Bank of Canadas nominal noon exchange rates, published at about 12:15 ET each business day. These are neither buying nor selling rates, and should be used for reference purposes only.</description>
<dc:language>en</dc:language>
<dc:date>2008-07-10</dc:date>
<dc:format>text/html</dc:format>
<cb:country>CA</cb:country>
<cb:baseCurrency>CAD</cb:baseCurrency>
<cb:targetCurrency>VEF</cb:targetCurrency>
<cb:value frequency="business" decimals="4">2.1254</cb:value>
<cb:rateType>noon</cb:rateType>
<cb:application>statistics</cb:application>
</item>
</rdf:RDF>;
trace(currency.children().length());//Should be 1 = 1
trace(currency.item[0);//Should be entire child node =undefined
trace(currency.item[0].title);//Should be CA: 2.1254 VEF1=throws error due to above
Any help is greatly appreciated.