The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Creating a database from XML, *head aches*
Mavrik347
post Feb 28 2011, 03:25 PM
Post #1


Member
***

Group: Members
Posts: 31
Joined: 24-November 06
Member No.: 1,107



view-source: http://api.eve-online.com/eve/AllianceList.xml.aspx

Hi chaps smile.gif I was hoping someone could point me in the right direction to achieve either one of three things in PHP. (1 being ok, 2 being better and 3 being bloody PERFECT)

1: (makes me very happy)
Dump the whole lot into a database. I presume the structure would be something like:
Table "alliances" with fields: name, shortName, allianceID, executorCorpID, memberCount, and startDate

Table "memberCorporations" with fields: corporationID, startDate and an additional allianceID (foreign link)
allianceID in the table memberCorporations would be the allianceID from the last <rowset> for example the first entry at the time of typing this would be:
corporationID="98000523" startDate="2010-11-09 16:52:00" allianceID="1354830081" (Goonswarm Federations allianceID)

2: (makes me ecstatic)
Not have to dump so much, just the "memberCorporations" table
Table "memberCorporations" with fields: corporationID, startDate and an additional allianceID
allianceID in the table memberCorporations would be the allianceID from the last <rowset> for example the first entry at the time of typing this would be:
corporationID="98000523" startDate="2010-11-09 16:52:00" allianceID="1354830081" (1354830081 is Goonswarm Federations allianceID)

3: (zomfg I'm in tears of joy and will love you forever)
Dump only the parts I want, in my case the <rowset> memberCorporations of a specified alliance.

Table "memberCorporations" with fields: corporationID, startDate

PSEUDO:
for eases sake I'll carry on using Goonswarm Federation
CODE

where <row name> =  "Goonswarm Federation"
dump <rowset name="memberCorporations">-><row>'s into TBLmemberCorporations



If anything doesn't make sense or I've explained poorly please ask away. Any help with this would be just colossal.
wacko.gif

This post has been edited by Mavrik347: Feb 28 2011, 03:30 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Mar 1 2011, 10:27 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,298
Joined: 31-August 06
Member No.: 43



Have you looked for 'xml' in the PHP manual? If the XML is syntactically correct you should be able to parse it into a structure, which you then traverse with DB updates. Unless you find someone who happens to do this all the time, it is bound to take a modicum of work to put it together.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 2nd June 2020 - 07:31 AM