I want to process an XML file and store the results in a mysql database. I will later do reports on the data. What is the best table structure for mysql? A table for objects and events? How do I process this log (there are hundreds of objects and hundreds of events) and store it to mysql?
I previously did a bit of work with PHP, so I know how to do the basics only.
So I have an XML file. Below is a truncated example:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<TacviewDebriefing Version="0.90">
<!--General Flight Data-->
<Flight>
<StartTime>21000.00</Start
Time>
<Duration>12243.05</Durati
on>
</Flight>
<!--Active Objects List-->
<Objects>
<Object ID="5219">
<Type>Missile</Type>
<Name>9M38M1 Buk-M1 (SA-11 Gadfly)</Name>
<Coalition>Enemies</Coalit
ion>
<Parent ID="45" />
</Object>
</Objects>
<!--Flight Log-->
<Events>
<Event>
<Time>1957.36</Time>
<Object ID="276" />
<Action>HasTakeOff</Action
>
<Airport ID="ICAO:UGSS">
<Name>Sukhumi-Babusheri Airport</Name>
</Airport>
</Event>
</Evemts>
Start Free Trial