Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to parse?

 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • 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*?
 
rahul dighe
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • 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 .. ???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic