Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can you guide me on how to print, seperately, the names of the players of each team? For the other data (ie name of the team, year created etc) that appear only once in each xml entry, I have no problem printing them out.<football_team> <Name>ONE</Name> <DateCreated> <Year>1990</Year> <Month>12</Month> <Day>04</Day> </DateCreated> <Players> <Player> <LastName>Wonguso</LastName> <ForeName>Jimm</ForeName> <Initials>JW</Initials> </Player> <Player> <LastName>Fearless</LastName> <ForeName>A</ForeName> <Initials>AF</Initials> </Player> </Players> <Hometown>New York</Hometown> </football_team> <football_team> <Name>TWO</Name> <DateCreated> <Year>1978</Year> <Month>9</Month> <Day>23</Day> </DateCreated> <Players> <Player> <LastName>Pedro</LastName> <ForeName>Therry</ForeName> <Initials>TP</Initials> </Player> <Player> <LastName>Haywardis</LastName> <ForeName>Richie</ForeName> <Initials>RH</Initials> </Player> <Player> <LastName>Eswa</LastName> <ForeName>Jeyan</ForeName> <Initials>JE</Initials> </Player> <Player> <LastName>Leongus</LastName> <ForeName>John</ForeName> <Initials>JL</Initials> </Player> <Player> <LastName>Bentson</LastName> <ForeName>Billie</ForeName> <Initials>BB</Initials> </Player> </Players> <Hometown>California</Hometown> </football_team>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: problem in XML parsing
by hipowls (Curate) on Mar 22, 2008 at 03:53 UTC | |
by ikegami (Patriarch) on Mar 22, 2008 at 05:29 UTC | |
by hipowls (Curate) on Mar 22, 2008 at 07:03 UTC | |
Re: problem in XML parsing
by nefigah (Monk) on Mar 22, 2008 at 04:28 UTC |