Hi there,
(Not exactly sure thats the correct topic for this post - I’m not sure what to call it! :goof:)
I’m running a cronjob every 5 minutes past the hour every hour. The data from this is being parsed from an XML document and then being insert into a database. This all works fine.
Example XML File Contents:
<?xml version='1.0' encoding='UTF-8'?>
<eveapi version="2">
<currentTime>2007-12-16 11:21:59</currentTime>
<result>
<rowset name="solarSystems" key="solarSystemID" columns="solarSystemID,shipKills,factionKills,podKills">
<row solarSystemID="30001343" shipKills="0" factionKills="17" podKills="0" />
<row solarSystemID="30002671" shipKills="0" factionKills="340" podKills="0" />
<row solarSystemID="30005327" shipKills="0" factionKills="21" podKills="0" />
<row solarSystemID="30002410" shipKills="0" factionKills="3" podKills="0" />
<row solarSystemID="30001082" shipKills="0" factionKills="3" podKills="0" />
<row solarSystemID="30001105" shipKills="0" factionKills="6" podKills="0" />
...
<row solarSystemID="30001937" shipKills="0" factionKills="14" podKills="0" />
<row solarSystemID="30003560" shipKills="0" factionKills="3" podKills="0" />
<row solarSystemID="30002478" shipKills="3" factionKills="15" podKills="2" />
<row solarSystemID="30004101" shipKills="0" factionKills="22" podKills="0" />
</rowset>
<dataTime>2007-12-16 10:57:53</dataTime>
</result>
<cachedUntil>2007-12-16 12:21:59</cachedUntil>
</eveapi>
http://wiki.eve-id.net/APIv2_Map_Kills_XML
However if a Solar System has had zero shipkills, factionkills and podkills the solarsystem does notappear in the hourly XML file. So if the solarsystem ID is not in the xml file I need to assume 0’s for each.
I have another database table with all of the solarsystem IDs listed.
What I’m trying to do is doing some sort of compare?? on the two tables and if the solarsystem id does not appear in the XML file I need to insert 0’s for each.
If someone could point me in the right direction that would be great!
Thanks very much,
Jase
P.S. I hope I’m making sense!!