android simplexml用动态名称解析元素

时间:2012-12-26 14:27:34

标签: java android xml dynamic simple-framework

我需要一些建议如何用java simplexml lib解析这个xml。 问题是我不知道我将在这个xml元素中有多少项。

<Playoffs>
<PlayoffStatus>Potential Brackets</PlayoffStatus>
<LConference>Western Conference</LConference>
<RConference>Eastern Conference</RConference>
<LTeam1>Clippers (1)</LTeam1>
<LTeam2>Nuggets (8)</LTeam2>
<LTeam3>Grizzlies (4)</LTeam3>
<LTeam4>Warriors (5)</LTeam4>
<LTeam5>Spurs (3)</LTeam5>
<RTeam1>Heat (1)</RTeam1>
<RTeam2>Celtics (8)</RTeam2>
<RTeam3>Pacers (4)</RTeam3>
<RTeam4>Bulls (5)</RTeam4>
<RTeam5>Hawks (3)</RTeam5>
    .......