子 xml 値を取得するにはどうすればよいですか?
つまり:xml.getName() = Section
サブ値を教えてください。その中でwhileループを使用する必要があると思いますが、それを達成できませんでした!
または、親の値を取得することは可能ですか?
<Top name="Top category">
<Section name="Sub category 1">
<Sub note="text" />
<Sub note="text" />
</Section>
<Section name="Sub category 2">
<Sub note="text" />
<Sub note="text" />
</Section>
</Top>
...
while (eventType != XmlPullParser.END_DOCUMENT) {
if ((eventType == XmlPullParser.START_TAG) &&(_xml.getName().equals("Section"))){
String _Section = _xml.getAttributeValue(null, "name");
// take its Sub note values
}
}
}