<dataXML version="1.0">
<RaceResults>
<FixedUpgrades>0</FixedUpgrades>
<Qualify>
<DateTime>1289648667</DateTime>
<Stream>
<Score et="1337.0">xxxxxxxxxx(27) lap=2 point=2 t=-1.000 et=1336.913</Score>
<Incident et="1386.8">xxxxxxxxxx(34) reported contact (0.03) with another vehicle xxxxxxxxxx(29)</Incident>
<Score et="1433.3">xxxxxxxxxx(28) lap=11 point=2 t=67.916 et=1433.185</Score>
<Incident et="1466.0">xxxxxxxxxx(33) reported contact (0.84) with Track</Incident>
<Incident et="1466.0">xxxxxxxxxx(33) reported contact (0.58) with Track</Incident>
</Stream>
</Qualify>
<Warmup>
<DateTime>1289656481</DateTime>
<Stream>
<Score et="99.7">xxxxxxxxxx(49) lap=0 point=1 t=-1.000 et=99.614</Score>
</Stream>
</Warmup>
<Race>
<DateTime>1289657579</DateTime>
<Stream>
<Incident et="73.6">xxxxxxxxxx(42) reported contact (0.06) with another vehicle xxxxxxxxxx(37)</Incident>
<Score et="1440.5">xxxxxxxxxx(32) lap=1 point=2 t=66.951 et=1440.365</Score>
<Incident et="144.1">xxxxxxxxxx(40) reported contact (0.13) with another vehicle xxxxxxxxxx(37)</Incident>
<Incident et="144.1">xxxxxxxxxx(37) reported contact (0.03) with another vehicle xxxxxxxxxx(40)</Incident>
</Stream>
</Race>
</RaceResults>
</dataXML>
I need to read all the <Incident> tags' values inside <race> tag and put those strings inside an array.I'm new to XML parsing and reading around I've found some code which uses simpleXML, but I can't use it.
On my pc I was using PHP5.2.9 and it said that simpleXML class was missing, I've instaled PHP5.3.1 but I have the same problem.
What should I use to do what I need? It's important that the code will be compatible with PHP5.2.12


Sign In
Create Account


Back to top









