By ronan.healy ·
hi i am new to and i have to get info of an xml file that looks like this

<Cube time="2008-08-07">
<Cube currency="USD" rate="1.5471" />
<Cube currency="JPY" rate="169.16" />
<Cube currency="BGN" rate="1.9558" />
<Cube currency="CZK" rate="24.105" />
<Cube currency="DKK" rate="7.4609" />
<Cube currency="EEK" rate="15.6466" />
<Cube currency="GBP" rate="0.79255" />
<Cube currency="HUF" rate="234.20" />
<Cube currency="LTL" rate="3.4528" />
<Cube currency="LVL" rate="0.7051" />
<Cube currency="PLN" rate="3.2458" />
<Cube currency="RON" rate="3.4805" />
<Cube currency="SEK" rate="9.4127" />
<Cube currency="SKK" rate="30.363" />
<Cube currency="CHF" rate="1.6322" />
<Cube currency="ISK" rate="123.88" />
<Cube currency="NOK" rate="7.9970" />
<Cube currency="HRK" rate="7.2126" />
<Cube currency="RUB" rate="36.4730" />
<Cube currency="TRY" rate="1.8050" />
<Cube currency="AUD" rate="1.6986" />
<Cube currency="BRL" rate="2.4356" />
<Cube currency="CAD" rate="1.6201" />
<Cube currency="CNY" rate="10.6153" />
<Cube currency="HKD" rate="12.0760" />
<Cube currency="IDR" rate="14078.61" />
<Cube currency="KRW" rate="1572.55" />
<Cube currency="MXN" rate="15.3828" />
<Cube currency="MYR" rate="5.0822" />
<Cube currency="NZD" rate="2.1537" />
<Cube currency="PHP" rate="67.760" />
<Cube currency="SGD" rate="2.1440" />
<Cube currency="THB" rate="51.971" />
<Cube currency="ZAR" rate="11.5027" />

can anyone help as i am very stuck. i can read normal xml files but my code wont work for this one

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Try this example..

Description of XML- file for the CrocoBuy system

<price date="?"> PART 1
<url>?</url> PART 2
<currency code="?"/>
<category id="?">?</category> PART 3
<category id="?" parentId="?">?</category>
<item id="?">
<item id="?"> PART 4

Part 1
Example: <price date="2007-05-13 16:51">
Attribute date should contain date and time of creation of the file.
Part 2
<currency code="USD" rate="5.2" />

Tag name contains only title of the shop.

Tag url contains reference to the main page of the shop.

Attribute code from tag currency shows type of currency in xml-file. Acceptable values are ?GBP?, ?USD?, ?EUR?, etc.

Attribute rate from tag currency shows currency rate.
<currency code="GBP" rate="5.2" /> - currency of the price is GB pound, rate is 5.2
<currency code="USD" /> - currency of the price is US dollar
<currency code="EUR" /> - currency of the price is Euro
Part 3
<category id="1">computers</category>
<category id="2" parentID="1">laptops</category>

Tag catalog contains description of the categories tree.

The tag "category" contains the described category name in the directory.

Attribute id from tag category contains an unique category id.

Attribute parentID from tag category contains parent category id (if attribute parentID is not present or equals 0 ? in this case root category becomes parent category).
Part 4
<item id="1">
<name>Wetsuit Okun 7 mm</name>
<description>This wetsuit for those who doesn?t want or can?t buy the
expensive wetsuit, but who wants to buy qualitative goods.
<item id="2">
<name> Wetsuit Okun 3 mm mono</name>
<vendor> Osminog </vendor>
<description>Monosuit made from neoprene 3 mm and it should be used for
immersion into warm water, and also for different kind of

Tag items contains all of the goods description in xml-file.

Tag item contains description of the separate goods.

Attribute id from tag item contains unique id of the goods.

Tag name contains the name of the goods.

Tag url contains reference on the goods page on the shop site.

Tag price contains price of the described goods (undesirable goods with price equal 0 or with price that is not real).

Tag categoryId contains category id from category tree (from PART 3 of this xml-file).

Tag vendor contains name of vendor for described goods. Not mandatory field.

Tag image contains a link on the image of the goods in gif, jpg or png format. Not mandatory field.

Tag description contains description of the goods, string under 64 Кб. Not mandatory field .

Please post back if you have any more problems or questions.

Related Discussions

Related Forums