i want to parse xml file i have xml like this
<parent>
<Title>1</Title>
<child>"Some data1"</child>
<child>"Some data2"</child>
<child>"Some data3"</child>
</parent>
<parent>
<Title>2</Title>
<child>"Some data1"</child>
<child>"Some data2"</child>
<child>"Some data3"</child>
</parent>
any idea to parse xml like this(UP side)
Edit:
if the structure like this
<parent>
<Title>2</Title>
<child>"Some data1"</child>
</parent>
i use
NodeList nodes1 = doc.getElementsByTagName("parent");
for (int i = 0; i < nodes1.getLength(); i++) {
Objectclass ciro = new Objectclass ();
Element e = (Element)nodes1.item(i);
ciro.Title = functionsClass.getValue(e, "Title");
ciro.child= functionsClass.getValue(e, "child");
ArrayListClass.ItemList.add(ciro);
}
here i am stroe data in a object class and then add object in array list then use data where i need.
but problem with same child name in parent how can i get these values..
<parent>
<Title>1</Title>
<child>"Some data1"</child>
<child>"Some data2"</child>
<child>"Some data3"</child>
</parent>
<parent>
<Title>2</Title>
<child>"Some data1"</child>
<child>"Some data2"</child>
<child>"Some data3"</child>
</parent>
any tutorial for this..