Help!!!! I have a catalog of products in an XML file. I need to be able to
display this catalog, one item at a time on the screen. I have been able to
create an XML connector, dataset, datagrid test, but it isn't anything like I
need. Can anyone take a quick look at the XML and give me some clues? My
issue is that there can be several child elements for each catalog item and I
need to display either a list or grid with each one. Of course I also need
some method of navigating between records also.
Any help would be greatly appreciated!!!!
<?xml version="1.0" encoding="UTF-8" ?>
- <Catalog>
- <cue>
<model>Cue 1</model>
<description>First Cue description</description>
<price>$795.00</price>
- <picture>
<filename>test1.gif</filename>
<caption>View of Butt</caption>
</picture>
<category>Playing Cue</category>
<length>58</length>
<weight>19.6</weight>
- <shaft>
<tip>Triangle</tip>
<ferrule>Melamene</ferrule>
<diameter>13.1</diameter>
<ring>Black with white checks</ring>
</shaft>
- <joint>
<style>Wood to Wood 3/8 x 11 Screw</style>
<ring>Black with white checks</ring>
</joint>
- <wrap>
<style>Irish Linen</style>
<color>Black with white spots</color>
</wrap>
</cue>
- <cue>
<model>Cue 2</model>
<description>Grey Ghost Cue 1</description>
<price>$595.00</price>
- <picture>
<filename>test2.gif</filename>
<caption>View of Butt</caption>
</picture>
<category>Jump Break Cue</category>
<length>58</length>
<weight>19.6</weight>
- <shaft>
<tip>Phenolic</tip>
<ferrule>Melamene</ferrule>
<diameter>13.1</diameter>
<ring>Black with silver ring</ring>
</shaft>
- <joint>
<style>Wood to Wood 3/8 x 11 Screw</style>
<ring>Black with silver ring</ring>
</joint>
- <wrap>
<style>None</style>
<color />
</wrap>
</cue>
- <cue>
<model>Cue 3</model>
<description>Concubine Cue</description>
<price>$1795.00</price>
- <picture>
<filename>test3.gif</filename>
<caption>View of Butt</caption>
</picture>
- <picture>
<filename>test4.gif</filename>
<caption>View of Joint</caption>
</picture>
<category>Playing Cue</category>
<length>58</length>
<weight>18.9</weight>
- <shaft>
<tip>Mori</tip>
<ferrule>Ivory</ferrule>
<diameter>13.2</diameter>
<ring>Black with white checks</ring>
</shaft>
- <shaft>
<tip>Triangle</tip>
<ferrule>Melemene</ferrule>
<diameter>13.1</diameter>
<ring>Black with white checks</ring>
</shaft>
- <joint>
<style>Wood to Wood 3/8 x 11 Screw</style>
<ring>Black with white checks</ring>
</joint>
- <wrap>
<style>Leather</style>
<color>Black Alligator</color>
</wrap>
</cue>
- <accessory>
<model>Omen Logo Shirt</model>
<description>Black XL with White logo</description>
- <picture>
<filename>shirt1.gif</filename>
<caption>View of Shirt and Logo</caption>
</picture>
<price>$29.95</price>
</accessory>
</Catalog>
LuigiL - 27 Jun 2005 12:27 GMT
Well, if you need more Catalog items you would have to wrap it all in rootnode
<data> (for instance)
<data>
<catalog id="shirts">
</catalog>
<catalog id="pants">
</catalog>
</data>
Method to navigate: you can do this in any way you like. You could use a
listbox with the catalogues and set up listeners for other lb's to choose
subcategories... which ever way you want.