Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Parsing an XML file with namespace

From: Steve <stephen.joung@----------.--->
To: NULL
Date: 9/21/2008 12:27:00 PM
I am new to XML but have managed to parse most of the XML files I have
come across within my javascript scripts. Until now. I am trying to
parse the currency file available free from http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml
The file looks like this:

<gesmes:Envelope>
<gesmes:subject>Reference rates</gesmes:subject>
<gesmes:Sender>
<gesmes:name>European Central Bank</gesmes:name>
</gesmes:Sender>
<Cube>
<Cube time="2008-09-19">
<Cube currency="USD" rate="1.4236"/>
<Cube currency="JPY" rate="153.03"/>
.......
<Cube currency="THB" rate="48.630"/>
<Cube currency="ZAR" rate="11.4902"/>
</Cube>
</Cube>
</gesmes:Envelope>

I can parse the gesmes:subject and gesmes:name but I have no idea how
to parse the <Cube> data, which is of course what I want. I have
Googled around and this leads me to believe that this is a namespace
issue but I cannot find out how to parse this within Javacript or if
necessary PHP

Any help would be greatly appreciated, Steve.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent