xml데이터가
-<leagues>
<league feedContents="0" id="758">ESL Pro Series - Fifa 2010</league>
<league feedContents="0" id="4681">Heroes Of Newerth World Cup</league>
<league feedContents="0" id="759">Heroes of Newerth - Honcast Invitational</league>
<league feedContents="0" id="10229">Hearthstone - BlizzCon World Championship</league>
.
.
.
이런식으로 돼 있는데
START_TAG 에서 태그를 뽑으면 league만 다 나오구요
TEXT 에서 텍스트를 뽑으면 가운데 String(ESL Pro Series .....) 만 출력됩니다.
feedContents와 id를 함께 뽑고싶은데 어떻게 하면 되나요 ?? 현재는
while (eventType != XmlPullParser.END_DOCUMENT) {
if(eventType == XmlPullParser.START_TAG){
if (!TextUtils.isEmpty(xpp.getName()) && xpp.getName().startsWith("leagues")) {
while (eventType != XmlPullParser.END_DOCUMENT) {
if (eventType == XmlPullParser.START_TAG) {
}
else if (eventType == XmlPullParser.TEXT) {
}
eventType = xpp.next();
}
}
}
eventType = xpp.next();
}
이렇게 돼 있습니다.