Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
below is my sample xml data.
<test>
<node id="1" />
<node id="2" />
<node id="3" />
<node id="4" />
<node id="5" />
<node id="1" />
</test>
My loop is on "/test"
in the xpath query for id, I am writing "node/@id", but it is giving me first entry only where id=1.
but i want all the id's, also I don't want to change the loop because other fields are related on that loop only. what should be the xpath query to get all the id's?
Thank You,
Sonali Jagtap
Try this way -
Hi,
I will not work in my case.
My loop will be on /test only. because there are other nodes as well along with "/test/node".
So my loop has to be on "/test"
I need to change the xpath query for id to get all the id's present in "node".
Thank You,
Sonali Jagtap
Hi, Please find my sample file,
<Response storeId="319">
<ProductTable>
<ProductInfo id="1001" name="TEST" />
<ProductInfo id="1003" name="TEST1" />
<ProductInfo id="1007" name="TEST2" />
</ProductTable>
<DayPartitioning>
<Segment id="1" begTime="0800" endTime="0814" dayOffset="0"/>
<Segment id="2" begTime="0815" endTime="0829" dayOffset="0"/>
<Segment id="3" begTime="0830" endTime="0844" dayOffset="0"/>
<Segment id="4" begTime="0900" endTime="0914" dayOffset="0"/>
<Segment id="5" begTime="0915" endTime="0929" dayOffset="0"/>
<Segment id="6" begTime="0945" endTime="0959" dayOffset="0"/>
<Segment id="7" begTime="1000" endTime="1014" dayOffset="0"/>
<Segment id="8" begTime="1015" endTime="1029" dayOffset="0"/>
<Segment id="9" begTime="1030" endTime="1044" dayOffset="0"/>
</DayPartitioning>
</Response>
I want all the data for StoreID=319 Please help me with the correct XPATH Query & Loop. Thank You, Sonali Jagtap