Import XML into MySql table - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Databases - MySQL, SQL, Oracle, Access and others

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-14-2006, 08:51 AM   #1 (permalink)
Junior Member
 
Join Date: Mar 2006
Posts: 19
Default Import XML into MySql table

Hi All

I want to put an XML file into a MySql table (without the use of Navicat or something similar). I assume this can be done without the use of XSLT and the XML data can be directly inserted into a table. Can anyone help?

Thankyou

Don

'You'll just have to turn this opportunity YES'

The XML:-

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2006 (http://www.altova.com) -->
<?xml-stylesheet type="text/xsl" href="birds.xsl" ?>

<British_Birds>

<species>
<name>Golden oriole</name>
<latin>Oriolus oriolus</latin>
<status>Summer</status>
<breeding>9-42</breeding>
<passage>85</passage>
<Image ID="123" URI="golden_oriole.jpg"/>
<url address="www.rspb.org.uk/birds/guide/g/goldenoriole/index.asp" />

</species>

<species>
<name>Sparrowhawk</name>
<latin>Accipiter nisus</latin>
<status>Resident</status>
<breeding>34,500</breeding>
<passage>0</passage>
<Image ID="123" URI="sparrowhawk.jpg"/>
<url address="www.rspb.org.uk/birds/guide/s/sparrowhawk/index.asp" />
</species>

<species>
<name>Siskin</name>
<latin>Carduelis spinus</latin>
<status>Resident/Winter</status>
<breeding>310,000</breeding>
<passage>0</passage>
<Image ID="123" URI="siskin.jpg"/>
<url address="www.rspb.org.uk/birds/guide/s/siskin/index.asp" />
</species>

<species>
<name>Hoopoe</name>
<latin>Upupa epops</latin>
<status>Passage</status>
<breeding>Occasional</breeding>
<passage>100</passage>
<Image ID="123" URI="hoopoe.jpg"/>
<url
address="www.rspb.org.uk/birds/guide/h/hoopoe/index.asp" />
</species>

</British_Birds>
Don Logan is offline   Reply With Quote
Sponsored Links
Old 04-25-2008, 11:15 AM   #2 (permalink)
Junior Member
 
Join Date: Apr 2008
Posts: 1
Post i propose we make a new subforum to stop the spam crud

sorry new here just speculating with all the spam posts that keep coming in I think we should make a subforum that we can report the links to. i dont know if that will help its up to you
BRobinsonHVV is offline   Reply With Quote
Old 09-10-2008, 06:48 AM   #3 (permalink)
Junior Member
 
Join Date: Sep 2008
Posts: 1
Smile Re: Import XML into MySql table

Quote:
Originally Posted by Don Logan
Hi All

I want to put an XML file into a MySql table (without the use of Navicat or something similar). I assume this can be done without the use of XSLT and the XML data can be directly inserted into a table. Can anyone help?

Thankyou

Don

'You'll just have to turn this opportunity YES'

The XML:-

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2006 (XML Editor, Data Management, UML, and Web Services Tools from Altova) -->
<?xml-stylesheet type="text/xsl" href="birds.xsl" ?>

<British_Birds>

<species>
<name>Golden oriole</name>
<latin>Oriolus oriolus</latin>
<status>Summer</status>
<breeding>9-42</breeding>
<passage>85</passage>
<Image ID="123" URI="golden_oriole.jpg"/>
<url address="www.rspb.org.uk/birds/guide/g/goldenoriole/index.asp" />

</species>

<species>
<name>Sparrowhawk</name>
<latin>Accipiter nisus</latin>
<status>Resident</status>
<breeding>34,500</breeding>
<passage>0</passage>
<Image ID="123" URI="sparrowhawk.jpg"/>
<url address="www.rspb.org.uk/birds/guide/s/sparrowhawk/index.asp" />
</species>

<species>
<name>Siskin</name>
<latin>Carduelis spinus</latin>
<status>Resident/Winter</status>
<breeding>310,000</breeding>
<passage>0</passage>
<Image ID="123" URI="siskin.jpg"/>
<url address="www.rspb.org.uk/birds/guide/s/siskin/index.asp" />
</species>

<species>
<name>Hoopoe</name>
<latin>Upupa epops</latin>
<status>Passage</status>
<breeding>Occasional</breeding>
<passage>100</passage>
<Image ID="123" URI="hoopoe.jpg"/>
<url
address="www.rspb.org.uk/birds/guide/h/hoopoe/index.asp" />
</species>

</British_Birds>
Did you manage to resolve this as i'm trying to do exactly the same... Maybe u could help
unisport is offline   Reply With Quote
Old 09-10-2008, 05:32 PM   #4 (permalink)
Junior Member
 
Join Date: Sep 2008
Posts: 9
Default Re: Import XML into MySql table

To store xml in a mysql database, you will need to use an xml parser. Check the php online manual, they have quite a few good examples of how to do it.

HTH,

vbplusme
vbplusme is offline   Reply With Quote
Old 02-11-2011, 10:36 PM   #5 (permalink)
Junior Member
 
Join Date: Feb 2011
Posts: 19
Default Re: Import XML into MySql table

I want to help you. You can search the Spire.DataExport on the Internet.
tomason is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:37 AM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting