Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading XML

Status
Not open for further replies.

paulbenn

Programmer
Jan 24, 2002
108
GB
Hi Everyone,

I am using Delphi 7 to try and Parse an XML file and export it to a Database, I have not worked with XML in Delphi and am having a few problems.

The XML Structure is as follows:

Code:
  <?xml version="1.0" encoding="Windows-1252" ?> 
- <rdf:RDF xmlns:rdf="[URL unfurl="true"]http://www.w3.org/1999/02/22-rdf-syntax-ns#"[/URL] xmlns:dc="[URL unfurl="true"]http://purl.org/dc/elements/1.1/"[/URL] xmlns:sy="[URL unfurl="true"]http://purl.org/rss/1.0/modules/syndication/"[/URL] xmlns:admin="[URL unfurl="true"]http://webns.net/mvcb/"[/URL] xmlns:cc="[URL unfurl="true"]http://web.resource.org/cc/"[/URL] xmlns="[URL unfurl="true"]http://purl.org/rss/1.0/">[/URL]
- <channel rdf:about="Caravan_Parks">
  <title>List of Caravan Parks</title> 
  <link>[URL unfurl="true"]http://holidaycamps.com</link>[/URL] 
  <description>someones list of Caravan Parks</description> 
  <dc:language>en-us</dc:language> 
  <dc:date>2004-08-13T12:11:18-05:00</dc:date> 
  <sy:updatePeriod>daily</sy:updatePeriod> 
  <sy:updateFrequency>1</sy:updateFrequency> 
  <sy:updateBase>2003-01-01T12:00-05:00</sy:updateBase> 
- <item>
  <campsite>Great Caravan Park</campsite> 
  <location>Bristol</location> 
  <cost>£3 per night</cost> 
  <description>Very nice location</description> 
  <infourl>[URL unfurl="true"]http://www.bristolcaravanpark.co.uk</infourl>[/URL] 
  </item>
- <item>
  <campsite>Great Caravan Park</campsite> 
  <location>Bristol</location> 
  <cost>£3 per night</cost> 
  <description>Very nice location</description> 
  <infourl>[URL unfurl="true"]http://www.bristolcaravanpark.co.uk</infourl>[/URL] 
  </item>
- <channel rdf:about="Holiday_Camps">
  <title>List of Holiday Camps</title> 
  <link>[URL unfurl="true"]http://holidaycamps.com</link>[/URL] 
  <description>someones list of holiday camps</description> 
  <dc:language>en-us</dc:language> 
  <dc:date>2004-08-13T12:11:18-05:00</dc:date> 
  <sy:updatePeriod>daily</sy:updatePeriod> 
  <sy:updateFrequency>1</sy:updateFrequency> 
  <sy:updateBase>2003-01-01T12:00-05:00</sy:updateBase> 
- <item>
  <campsite>Great Caravan Park</campsite> 
  <location>Bristol</location> 
  <cost>£3 per night</cost> 
  <description>Very nice location</description> 
  <infourl>[URL unfurl="true"]http://www.bristolcaravanpark.co.uk</infourl>[/URL] 
  </item>
- <item>
  <campsite>Great Caravan Park</campsite> 
  <location>Bristol</location> 
  <cost>£3 per night</cost> 
  <description>Very nice location</description> 
  <infourl>[URL unfurl="true"]http://www.bristolcaravanpark.co.uk</infourl>[/URL] 
  </item>

I have created the above data a an example...

I need to export the data from Channel "Caravan_Parks" and put it into Caravan.db and the "Holiday_camps" into holiday camps DB

Any code examples would be helpful.



Kind Regards, Paul Benn

**** Never Giveup, keep trying, the answer is out there!!! ****
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top