• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How to parse this xml response from server -- tag Data1 is repeating itself?

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm receiving an xml response from a server that looks like this (pic below).
Question: note 2 Data1:

<Data1>5</Data1>
<Data1>20</Data1>

I wish to retrieve those numbers with my code but unable to do so because the response Column is the same.
I get:
Data result 1 : 5
Data result 2 : 5


Any way to circumvent this?



 
Marshal
Posts: 27534
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code you posted says, in effect:



It appears that you want something different, something like this:



Am I right? If so then write code which does that. There's nothing web-servicey about that, it's just a matter of doing the DOM-bashing right.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic