from the given XML i want to read second or third set of data. How i can do that?
in = XMLDoc.Element(“breakfast_menu”).Element(“food”).Elements
By using below flow i can able to read the first set of data
@ppr - Thanks for responding, i tried its working but in this case i can see all the records under food element but if i want to read particular element from 2nd or 3rd position how to do that?
e.g.
Berry-Berry Belgian Waffles
$8.95
Belgian waffles covered with assorted fresh berries and whipped cream
@vaibhav2.chavan
Lets step further one by one
A discrete Access can be done by using element Index e.g
XMLDoc.Element(“breakfast_menu”).Elements(“food”).tolist returning a list of xelement
And mylistvar.elementat(1) should Return the Second good element
Accessing a particular information Could be done Like mylistvar.elementat(1).element(“name”).value.tostring and should return the Name of the Second food element.
Thanks for clarification, i have used the expression - XMLDoc.Element(“breakfast_menu”).Elements(“food”).tolist returning a list of xelement
its giving me the list of elements.
but after that im not getting how to use it in for each.
Could you please help me to sort it out.
Your current flow iterates over all food Elements given by the Statement XMLDoc.Element(“breakfast_menu”).Elements(“food”).tolist
A discrete Access Like
mylistvar.elementat(1).element(“name”).value.tostring is returning the Second food element.
Here WE are using this within an assign Activity and assigning the Second food element to a variable of xelement Datatype. No Iteration ist Here needed on food element Base
@vaibhav2.chavan
Should be only a small issue. In such cases the xaml should be Debugger and IT has to checked that the mylistvar is receiving the food element list.
@ppr - i just changed the variable name from mylistvar to mylistvar1 it worked but when im displaying the SecondElement in message box im getting whole list as like output of mylistvar
@vaibhav2.chavan
Sorry for my Cellphone Auto correction malfunction. Can you Post the Second Statement, that you are using for the secondelement and can you Post the output