hente xml dokument over i php
Hejsa.Jeg har følgende xml fil som findes på nettet via adressen
http://sti.paa/filen.xml
<?xml version="1.0"?>
<HattrickData>
<FileName>matchDetails.asp</FileName>
<Version>1.3</Version>
<UserID></UserID>
<FetchedDate>2006-03-27 17:17:28</FetchedDate>
<ActionType>view</ActionType>
<Match>
<MatchID>9213693</MatchID>
<MatchDate>2003-07-18 20:00:00</MatchDate>
<FinishedDate>2003-07-18 21:45:00</FinishedDate>
<HomeTeam>
<HomeTeamID>3001</HomeTeamID>
<HomeTeamName>England</HomeTeamName>
<Dress>N031108</Dress>
<HomeGoals>0</HomeGoals>
<TacticType>0</TacticType>
<TacticSkill>8</TacticSkill>
<RatingMidfield>24</RatingMidfield>
<RatingRightDef>55</RatingRightDef>
<RatingMidDef>61</RatingMidDef>
<RatingLeftDef>42</RatingLeftDef>
<RatingRightAtt>13</RatingRightAtt>
<RatingMidAtt>25</RatingMidAtt>
<RatingLeftAtt>15</RatingLeftAtt>
</HomeTeam>
<AwayTeam>
<AwayTeamID>3000</AwayTeamID>
<AwayTeamName>Sverige</AwayTeamName>
<Dress>N210521</Dress>
<AwayGoals>4</AwayGoals>
<TacticType>0</TacticType>
<TacticSkill>8</TacticSkill>
<RatingMidfield>77</RatingMidfield>
<RatingRightDef>34</RatingRightDef>
<RatingMidDef>46</RatingMidDef>
<RatingLeftDef>32</RatingLeftDef>
<RatingRightAtt>55</RatingRightAtt>
<RatingMidAtt>57</RatingMidAtt>
<RatingLeftAtt>50</RatingLeftAtt>
</AwayTeam>
<Arena>
<ArenaID>21385</ArenaID>
<ArenaName>Tweede Kamer</ArenaName>
<WeatherID>0</WeatherID>
<SoldTotal>54220</SoldTotal>
</Arena>
<Scorers NumberOfGoals="4">
<Goal Index="0">
<ScorerPlayerID>186689</ScorerPlayerID>
<ScorerPlayerName>Martin L Sälglund</ScorerPlayerName>
<ScorerTeamID>3000</ScorerTeamID>
<ScorerHomeGoals>0</ScorerHomeGoals>
<ScorerAwayGoals>1</ScorerAwayGoals>
<ScorerMinute>3</ScorerMinute>
</Goal>
<Goal Index="1">
<ScorerPlayerID>181174</ScorerPlayerID>
<ScorerPlayerName>Fredrik Robertsson</ScorerPlayerName>
<ScorerTeamID>3000</ScorerTeamID>
<ScorerHomeGoals>0</ScorerHomeGoals>
<ScorerAwayGoals>2</ScorerAwayGoals>
<ScorerMinute>19</ScorerMinute>
</Goal>
<Goal Index="2">
<ScorerPlayerID>166382</ScorerPlayerID>
<ScorerPlayerName>Anders Thornquist</ScorerPlayerName>
<ScorerTeamID>3000</ScorerTeamID>
<ScorerHomeGoals>0</ScorerHomeGoals>
<ScorerAwayGoals>3</ScorerAwayGoals>
<ScorerMinute>28</ScorerMinute>
</Goal>
<Goal Index="3">
<ScorerPlayerID>166382</ScorerPlayerID>
<ScorerPlayerName>Anders Thornquist</ScorerPlayerName>
<ScorerTeamID>3000</ScorerTeamID>
<ScorerHomeGoals>0</ScorerHomeGoals>
<ScorerAwayGoals>4</ScorerAwayGoals>
<ScorerMinute>30</ScorerMinute>
</Goal>
</Scorers>
<Bookings NumberOfBookings="1">
<Booking Index="0">
<BookingPlayerID>1579448</BookingPlayerID>
<BookingPlayerName>Dave Broadbent</BookingPlayerName>
<BookingTeamID>3001</BookingTeamID>
<BookingType>2</BookingType>
<BookingMinute>35</BookingMinute>
</Booking>
</Bookings>
</Match>
</HattrickData>
Hvordan henter jeg de forskellige elementer ind i et php dokument, og tildeler værdierne til forskellige php variable??
Vil gerne lave en side som viser nogle "basic" ting fra "kampreferatet" så som:
hjemmehold - udehold
resultat
tilskuere
osv.
På forhånd tak for hjælpen.
