Hello monks,
as I am new to Perl, I am trying to parse an xml file just by manipulating it as a simple file (I am totally unfamiliar with modules etc)... Up to now I seemed to have no problem, but I have come to a point that I need help. What I need help in is parsing xml nodes that appear more than one times in my xml file.
Consider the following example file:
<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>
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.
Thank you beforehand!