Discussion

12
Replies
3509
Views
SubbaReddyByreddy Member since 2014 6 posts
PEGA
Posted: August 25, 2015
Last activity: September 1, 2015
Closed

How to parse xml for repeat elements

I have a sample  xml like this.

<NewDataSet> <Table> <Country>British Indian Ocean Territory</Country> <City>Diego Garcia</City> </Table> <Table> <Country>India</Country> <City>Ahmadabad</City> </Table> <Table> <Country>India</Country> <City>Akola</City> </Table> <Table> <Country>India</Country> <City>Aurangabad Chikalthan Aerodrome</City> </Table> <Table> <Country>India</Country> <City>Bombay / Santacruz</City> </Table> <Table> <Country>India</Country> <City>Bilaspur</City> </Table> <Table> <Country>India</Country> <City>Bhuj-Rudramata</City> </Table> </NewDataSet>

 

in this Newdataset is a root element.Table elemnet is repeatable.

 

i tried to write parse xml for that xml like this

parse xml.PNG

 

when i run it,

i am getting only first table elements values only.

 

parse xmloutput.PNG

 

i also made Table element repeatable.

 

My aim is to get all the city values.

 

your help is most appreciated.

Moderation Team has archived post
Share this page LinkedIn