Urgent : simpleXML issue

i have the code bellow , and i need to select the informations about evey match , i have to select the match child from the node and loop the infos to insert in my database .

<gsmrs version="2.0" sport="soccer" lang="en" last_generated="2015-10-29 15:02:41" last_updated="2015-10-29 12:42:27"><method method_id="2" name="get_matches"><parameter name="detailed" value="no"/><parameter name="end_date" value="2015-12-31 00:00:00"/><parameter name="id" value="302"/><parameter name="lang" value="en"/><parameter name="start_date" value="2015-01-01 00:00:00"/><parameter name="type" value="team"/></method><competition competition_id="241" ow_competition_id="420" name="Copa Libertadores" teamtype="default" display_order="50" type="club" area_id="5" area_name="South America" last_updated="2015-10-29 14:18:44" soccertype="default"><season season_id="10671" name="2015" start_date="2015-02-03" end_date="2015-08-06" service_level="0" last_updated="2015-10-29 14:18:44"><round round_id="30087" name="2nd Round" start_date="2015-02-17" end_date="2015-04-23" type="table" groups="8" has_outgroup_matches="no" last_updated="2015-10-29 14:18:44"><group group_id="8321" name="Group 2" details="" winner="" last_updated="2015-10-27 11:28:38"><match match_id="1993644" ow_match_id="790702" date_utc="2015-02-19" time_utc="00:00:00" date_london="2015-02-19" time_london="00:00:00" team_A_id="320" ow_team_A_id="609" team_A_name="Corinthians" team_A_country="BRA" team_B_id="302" ow_team_B_id="451" team_B_name="São Paulo" team_B_country="BRA" status="Played" gameweek="1" winner="team_A" fs_A="2" fs_B="0" hts_A="1" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-27 11:28:38"/><match match_id="1993632" ow_match_id="790704" date_utc="2015-02-26" time_utc="01:00:00" date_london="2015-02-26" time_london="01:00:00" team_A_id="302" ow_team_A_id="451" team_A_name="São Paulo" team_A_country="BRA" team_B_id="2282" ow_team_B_id="1448" team_B_name="Danubio" team_B_country="URY" status="Played" gameweek="2" winner="team_A" fs_A="4" fs_B="0" hts_A="2" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-27 11:28:38"/><match match_id="2004912" ow_match_id="790707" date_utc="2015-03-19" time_utc="01:00:00" date_london="2015-03-19" time_london="01:00:00" team_A_id="302" ow_team_A_id="451" team_A_name="São Paulo" team_A_country="BRA" team_B_id="109" ow_team_B_id="2549" team_B_name="San Lorenzo" team_B_country="ARG" status="Played" gameweek="3" winner="team_A" fs_A="1" fs_B="0" hts_A="0" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-23 02:04:08"/><match match_id="2004913" ow_match_id="790708" date_utc="2015-04-01" time_utc="22:45:00" date_london="2015-04-01" time_london="23:45:00" team_A_id="109" ow_team_A_id="2549" team_A_name="San Lorenzo" team_A_country="ARG" team_B_id="302" ow_team_B_id="451" team_B_name="São Paulo" team_B_country="BRA" status="Played" gameweek="4" winner="team_A" fs_A="1" fs_B="0" hts_A="0" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-23 02:04:08"/><match match_id="2004915" ow_match_id="790710" date_utc="2015-04-16" time_utc="01:00:00" date_london="2015-04-16" time_london="02:00:00" team_A_id="2282" ow_team_A_id="1448" team_A_name="Danubio" team_A_country="URY" team_B_id="302" ow_team_B_id="451" team_B_name="São Paulo" team_B_country="BRA" status="Played" gameweek="5" winner="team_B" fs_A="1" fs_B="2" hts_A="0" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-27 11:28:38"/><match match_id="2004918" ow_match_id="790713" date_utc="2015-04-23" time_utc="01:00:00" date_london="2015-04-23" time_london="02:00:00" team_A_id="302" ow_team_A_id="451" team_A_name="São Paulo" team_A_country="BRA" team_B_id="320" ow_team_B_id="609" team_B_name="Corinthians" team_B_country="BRA" status="Played" gameweek="6" winner="team_A" fs_A="2" fs_B="0" hts_A="2" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-27 11:28:38"/></group></round><round round_id="30088" name="8th Finals" start_date="2015-04-28" end_date="2015-05-15" type="cup" groups="0" has_outgroup_matches="no" last_updated="2015-10-29 11:01:04"><aggr winner="Cruzeiro" winner_team_id="304" ow_winner_team_id="764"><match match_id="2030219" ow_match_id="800832" date_utc="2015-05-07" time_utc="01:00:00" date_london="2015-05-07" time_london="02:00:00" team_A_id="302" ow_team_A_id="451" team_A_name="São Paulo" team_A_country="BRA" team_B_id="304" ow_team_B_id="764" team_B_name="Cruzeiro" team_B_country="BRA" status="Played" gameweek="" winner="team_A" fs_A="1" fs_B="0" hts_A="0" hts_B="0" ets_A="" ets_B="" ps_A="" ps_B="" last_updated="2015-10-29 11:01:04"/><match match_id="2030220" ow_match_id="800840" date_utc="2015-05-13" time_utc="22:30:00" date_london="2015-05-13" time_london="23:30:00" team_A_id="304" ow_team_A_id="764" team_A_name="Cruzeiro" team_A_country="BRA" team_B_id="302" ow_team_B_id="451" team_B_name="São Paulo" team_B_country="BRA" status="Played" gameweek="" winner="team_A" fs_A="1" fs_B="0" hts_A="0" hts_B="0" ets_A="" ets_B="" ps_A="4" ps_B="3" last_updated="2015-10-29 11:01:04"/></aggr></round></season></competition>

Thanks in advance

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s