Malcolmhire2001 Posted January 11, 2007 Share Posted January 11, 2007 hellobasiclly i want a list box to be dynamically created where the type of holiday is listed in the list box.i havent got a clue how to do this using XML but i know how to do this using MySQL.here is my XML file (holiday.xml:[code]<?xml version="1.0" ?><!-- This XML data file contains only a small amount of data. You may insert additional data (providing that it conforms to the tag structure) in order to aid further testing of your code during its development. However, your work will bemarked using clean copies of the files provided for use with this assignment (the XML data file holidays.xml and the SQL script HOLIDAYcg0119(Oracle).sql--><holidays> <holiday> <holidaycode>C1257</holidaycode> <type>Cottage</type> <maxsleeps>8</maxsleeps> <company>Allseasons</company> <location>Fulbeck, Northumberland</location> <dates> <date> <startdate>29-10-2006</startdate> <enddate>31-10-2006</enddate> <duration>3</duration> <costprice>419</costprice> </date> <date> <startdate>12-11-2006</startdate> <enddate>14-11-2006</enddate> <duration>3</duration> <costprice>419</costprice> </date> <date> <startdate>08-04-2007</startdate> <enddate>10-04-2007</enddate> <duration>3</duration> <costprice>621</costprice> </date> <date> <startdate>28-05-2007</startdate> <enddate>04-06-2007</enddate> <duration>5</duration> <costprice>1045</costprice> </date> <date> <startdate>01-08-2007</startdate> <enddate>07-08-2007</enddate> <duration>7</duration> <costprice>1242</costprice> </date> </dates> </holiday> <holiday> <holidaycode>C4981</holidaycode> <type>Cottage</type> <maxsleeps>6</maxsleeps> <company>NewHolidays</company> <location>Old Cornsay, County Durham</location> <dates> <date> <startdate>21-12-2006</startdate> <enddate>27-12-2006</enddate> <duration>7</duration> <costprice>569</costprice> </date> <date> <startdate>14-02-2007</startdate> <enddate>16-02-2007</enddate> <duration>3</duration> <costprice>250</costprice> </date> <date> <startdate>03-06-2007</startdate> <enddate>09-06-2007</enddate> <duration>7</duration> <costprice>427</costprice> </date> <date> <startdate>22-07-2007</startdate> <enddate>24-07-2007</enddate> <duration>3</duration> <costprice>453</costprice> </date> <date> <startdate>16-09-2007</startdate> <enddate>22-09-2007</enddate> <duration>7</duration> <costprice>416</costprice> </date> </dates> </holiday> <holiday> <holidaycode>C2529</holidaycode> <type>Cottage</type> <maxsleeps>4</maxsleeps> <company>DorsetHols</company> <location>North Beaminster, Dorset</location> <dates> <date> <startdate>14-10-2007</startdate> <enddate>20-10-2007</enddate> <duration>7</duration> <costprice>313</costprice> </date> <date> <startdate>20-08-2007</startdate> <enddate>26-08-2007</enddate> <duration>7</duration> <costprice>629</costprice> </date> <date> <startdate>03-01-2007</startdate> <enddate>05-01-2007</enddate> <duration>3</duration> <costprice>569</costprice> </date> <date> <startdate>04-11-2006</startdate> <enddate>10-11-2006</enddate> <duration>7</duration> <costprice>280</costprice> </date> <date> <startdate>10-04-2007</startdate> <enddate>12-04-2007</enddate> <duration>3</duration> <costprice>307</costprice> </date> </dates> </holiday> <holiday> <holidaycode>B2389</holidaycode> <type>Boating</type> <maxsleeps>7</maxsleeps> <company>ElvinBoats</company> <location>River Bure, Horning, Norfolk</location> <dates> <date> <startdate>02-07-2007</startdate> <enddate>08-07-2007</enddate> <duration>7</duration> <costprice>995</costprice> </date> <date> <startdate>19-08-2007</startdate> <enddate>25-08-2007</enddate> <duration>7</duration> <costprice>1242</costprice> </date> <date> <startdate>15-05-2007</startdate> <enddate>17-05-2007</enddate> <duration>3</duration> <costprice>530</costprice> </date> <date> <startdate>25-03-2007</startdate> <enddate>27-03-2007</enddate> <duration>3</duration> <costprice>432</costprice> </date> <date> <startdate>02-09-2007</startdate> <enddate>08-09-2007</enddate> <duration>7</duration> <costprice>978</costprice> </date> </dates> </holiday> <holiday> <holidaycode>B1078</holidaycode> <type>Boating</type> <maxsleeps>6</maxsleeps> <company>FloatingHols</company> <location>River Bure, Wroxham, Norfolk</location> <dates> <date> <startdate>24-06-2007</startdate> <enddate>30-06-2007</enddate> <duration>7</duration> <costprice>682</costprice> </date> <date> <startdate>29-10-2006</startdate> <enddate>31-10-2006</enddate> <duration>3</duration> <costprice>419</costprice> </date> <date> <startdate>15-04-2007</startdate> <enddate>21-04-2007</enddate> <duration>7</duration> <costprice>680</costprice> </date> <date> <startdate>03-06-2007</startdate> <enddate>09-06-2007</enddate> <duration>7</duration> <costprice>853</costprice> </date> <date> <startdate>08-09-2006</startdate> <enddate>10-09-2006</enddate> <duration>3</duration> <costprice>476</costprice> </date> </dates> </holiday> <holiday> <holidaycode>B0988</holidaycode> <type>Boating</type> <maxsleeps>6</maxsleeps> <company>Andersons</company> <location>River Ant, Stalham, Norfolk</location> <dates> <date> <startdate>17-06-2007</startdate> <enddate>23-06-2007</enddate> <duration>7</duration> <costprice>930</costprice> </date> <date> <startdate>22-07-2007</startdate> <enddate>28-07-2007</enddate> <duration>7</duration> <costprice>1190</costprice> </date> <date> <startdate>10-05-2007</startdate> <enddate>12-05-2007</enddate> <duration>3</duration> <costprice>530</costprice> </date> <date> <startdate>23-07-2007</startdate> <enddate>25-07-2007</enddate> <duration>3</duration> <costprice>884</costprice> </date> <date> <startdate>02-09-2006</startdate> <enddate>08-09-2006</enddate> <duration>7</duration> <costprice>840</costprice> </date> </dates> </holiday> <holiday> <holidaycode>L4390</holidaycode> <type>Lodge</type> <maxsleeps>6</maxsleeps> <company>LejkHolidays</company> <location>Seaton, Looe, Cornwall</location> <dates> <date> <startdate>10-06-2007</startdate> <enddate>16-06-2007</enddate> <duration>7</duration> <costprice>350</costprice> </date> <date> <startdate>22-07-2007</startdate> <enddate>28-07-2007</enddate> <duration>7</duration> <costprice>620</costprice> </date> <date> <startdate>10-05-2007</startdate> <enddate>12-05-2007</enddate> <duration>3</duration> <costprice>145</costprice> </date> <date> <startdate>23-07-2007</startdate> <enddate>25-07-2007</enddate> <duration>3</duration> <costprice>409</costprice> </date> <date> <startdate>02-09-2006</startdate> <enddate>08-09-2006</enddate> <duration>7</duration> <costprice>293</costprice> </date> </dates> </holiday> <holiday> <holidaycode>CA852</holidaycode> <type>Caravan</type> <maxsleeps>8</maxsleeps> <company>EllmanGetaways</company> <location>Hopton on Sea, Norfolk</location> <dates> <date> <startdate>01-04-2007</startdate> <enddate>07-04-2007</enddate> <duration>7</duration> <costprice>379</costprice> </date> <date> <startdate>10-05-2007</startdate> <enddate>16-05-2007</enddate> <duration>7</duration> <costprice>339</costprice> </date> <date> <startdate>20-08-2007</startdate> <enddate>22-08-2007</enddate> <duration>3</duration> <costprice>829</costprice> </date> <date> <startdate>02-09-2007</startdate> <enddate>08-09-2007</enddate> <duration>7</duration> <costprice>504</costprice> </date> <date> <startdate>15-07-2007</startdate> <enddate>17-07-2007</enddate> <duration>3</duration> <costprice>489</costprice> </date> </dates> </holiday> <holiday> <holidaycode>L9023</holidaycode> <type>Lodge</type> <maxsleeps>8</maxsleeps> <company>EllmanGetaways</company> <location>Darsham, Suffolk</location> <dates> <date> <startdate>03-04-2007</startdate> <enddate>09-04-2007</enddate> <duration>7</duration> <costprice>175</costprice> </date> <date> <startdate>14-05-2007</startdate> <enddate>20-05-2007</enddate> <duration>7</duration> <costprice>256</costprice> </date> <date> <startdate>18-08-2007</startdate> <enddate>20-08-2007</enddate> <duration>3</duration> <costprice>357</costprice> </date> <date> <startdate>05-09-2007</startdate> <enddate>11-09-2007</enddate> <duration>7</duration> <costprice>268</costprice> </date> <date> <startdate>10-07-2007</startdate> <enddate>12-07-2007</enddate> <duration>3</duration> <costprice>276</costprice> </date> </dates> </holiday> <holiday> <holidaycode>C7845</holidaycode> <type>Caravan</type> <maxsleeps>6</maxsleeps> <company>EssexHolidays</company> <location>St Osyth, Clacton-on-Sea, Essex</location> <dates> <date> <startdate>22-04-2007</startdate> <enddate>24-04-2007</enddate> <duration>3</duration> <costprice>204</costprice> </date> <date> <startdate>07-05-2007</startdate> <enddate>13-05-2007</enddate> <duration>7</duration> <costprice>341</costprice> </date> <date> <startdate>26-08-2007</startdate> <enddate>28-08-2007</enddate> <duration>3</duration> <costprice>506</costprice> </date> <date> <startdate>03-09-2007</startdate> <enddate>09-09-2007</enddate> <duration>7</duration> <costprice>451</costprice> </date> <date> <startdate>15-07-2007</startdate> <enddate>21-07-2007</enddate> <duration>7</duration> <costprice>676</costprice> </date> </dates> </holiday> <holiday> <holidaycode>HEB01</holidaycode> <type>Hotel</type> <maxsleeps>2</maxsleeps> <company>Edwardian Grand</company> <location>Oxford Street, London</location> <dates> <date> <startdate>14-11-2006</startdate> <enddate>15-11-2006</enddate> <duration>1</duration> <costprice>185</costprice> </date> <date> <startdate>14-11-2006</startdate> <enddate>16-11-2006</enddate> <duration>2</duration> <costprice>350</costprice> </date> <date> <startdate>26-08-2007</startdate> <enddate>01-09-2007</enddate> <duration>7</duration> <costprice>1200</costprice> </date> </dates> </holiday> <holiday> <holidaycode>H2589</holidaycode> <type>Hotel</type> <maxsleeps>2</maxsleeps> <company>Hotel Mikko</company> <location>Marble Arch, London</location> <dates> <date> <startdate>12-12-2006</startdate> <enddate>13-12-2006</enddate> <duration>1</duration> <costprice>140</costprice> </date> <date> <startdate>22-11-2006</startdate> <enddate>24-11-2006</enddate> <duration>2</duration> <costprice>255</costprice> </date> <date> <startdate>20-08-2007</startdate> <enddate>26-08-2007</enddate> <duration>7</duration> <costprice>900</costprice> </date> </dates> </holiday> <holiday> <holidaycode>H3892</holidaycode> <type>Hotel</type> <maxsleeps>4</maxsleeps> <company>Swansea Inn</company> <location>Swansea</location> <dates> <date> <startdate>12-12-2006</startdate> <enddate>13-12-2006</enddate> <duration>1</duration> <costprice>74</costprice> </date> <date> <startdate>22-11-2006</startdate> <enddate>24-11-2006</enddate> <duration>2</duration> <costprice>130</costprice> </date> <date> <startdate>20-08-2007</startdate> <enddate>26-08-2007</enddate> <duration>7</duration> <costprice>450</costprice> </date> </dates> </holiday> <holiday> <holidaycode>H5840</holidaycode> <type>Hotel</type> <maxsleeps>3</maxsleeps> <company>Burns Hotel</company> <location>Glasgow</location> <dates> <date> <startdate>12-12-2006</startdate> <enddate>13-12-2006</enddate> <duration>1</duration> <costprice>42</costprice> </date> <date> <startdate>18-11-2006</startdate> <enddate>20-11-2006</enddate> <duration>2</duration> <costprice>75</costprice> </date> <date> <startdate>17-09-2007</startdate> <enddate>23-09-2007</enddate> <duration>7</duration> <costprice>280</costprice> </date> </dates> </holiday></holidays>[/code]If anyone could help pleaseThanks, Mal Link to comment https://forums.phpfreaks.com/topic/33776-xml-list-box/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.