I have a xml in the following format.
<?xml version="1.0" encoding="UTF-8" standalone= "yes"?>
<rss>
<report name="rpt1">
<title>AAA</title>
<image></image>
<weblink></weblink>
<pdflink></pdflink>
<pdfsize></pdfsize>
</report>
<report name="rpt2">
<title>BBB</title>
<image>CCC</image>
<weblink>DDD</weblink>
<pdflink>EEE</pdflink>
<pdfsize>FFF</pdfsize>
</report>
</rss>
Now I want to iterate this xml and get the report node and from there get childnodes like title/pdflink/size etc which would be thru. looping using for loop.
I want to use xmltextreader to accomplish this. I tried using while but I get only 1 loop after iterating. I don't know why. If thru for loop how do I iterate like,
for(loop when reader.element("reports)){}
and then get the rest of the nodes and put them in an array or list or so. Once I get them stored in list I would want to display them in a feed.
What is the best way to do this? Pls, help.