• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to parse?

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<?xml version="1.0" encoding="UTF-8"?>
<hpcp>
<table no="1">
<check id="1234">
<persons>4</persons>
</check>
</table>
<table no="2">
<check id="123">
<persons>4</persons>
</check>
<check id="3333">
<persons>3</persons>
</check>
</table>
<table no="3">
<check id="23433">
<persons>4</persons>
</check>
<check id="45454">
<persons>4</persons>
</check>
<check id="4543">
<persons>4</persons>
</check>
</table>
</hpcp>
the snippet as following:

I parses it,I want every tableno map serval checkid,but I got every tableno has the same checkid(all checkid of xml doc)
How can I compose *for loop*?
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i cant' really follow everything you are saying.
do you want to find out all the checkid's for a given table number is that what you are trying to do .. ???
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic