for each that gets data from multiple nodes

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have to create some output based on xml coming from Biztalk. Here is my input

<ns0:Response Type="Order" SearchId="7d9805d8-ceb5-4da9-af10-e80f5bccfad9" AppId="VA" SubscriptionId="" SearchType="LINKANALYSIS" QueryId="1" ObjectCount="5" PageNum="1" TotalObjects="TotalObjects_8" DataSourceId="RMS" RelationshipConfidence="1" RelatedBy="Order-Person"
xmlns:ns0=" http://dal.scattergather.schemas.dalresponse/ http://DAL.ScatterGather.Schemas.DALResponse
<Object Type="GlobalOrder" ObjectId="-51676 <Field Name="orderid -112340</Field><Field Name="itemid -51676</Field><Field Name="itemorderdatetime Aug 18 2011</Field><Field Name="LastName Smith</Field><Field
Name="FirstName KESIA</Field><Field Name="Orderid 2011-00024642</Field><Field Name="lineNumber -51676</Field><Field Name="object_id -51676</Field><Field Name="orderID 2011-00024642</Field><Field
Name="item_description Blue Socks</Field></Object><br/>
<Object Type="GlobalOrder" ObjectId="-51675 <Field Name="orderid -112340</Field><Field Name="itemid -51675</Field><Field Name="itemorderdatetime Aug 18 2011</Field><Field Name="LastName Smith</Field><Field
Name="FirstName KESIA</Field><Field Name="Orderid 2011-00024642</Field><Field Name="lineNumber -51675</Field><Field Name="object_id -51675</Field><Field Name="orderID 2011-00024642</Field><Field
Name="item_description Black Socks</Field></Object><br/>
<Object Type="GlobalOrder" ObjectId="-51677 <Field Name="orderid -112340</Field><Field Name="itemid -51677</Field><Field Name="itemorderdatetime Aug 18 2011</Field><Field Name="LastName Smith</Field><Field
Name="FirstName KESIA</Field><Field Name="Orderid 2011-00024642</Field><Field Name="lineNumber -51677</Field><Field Name="object_id -51677</Field><Field Name="orderID 2011-00024642</Field><Field
Name="item_description Red Socks</Field></Object><br/>
<Object Type="GlobalOrder" ObjectId="-51678 <Field Name="orderid -112340</Field><Field Name="itemid -51678</Field><Field Name="itemorderdatetime Aug 18 2011</Field><Field Name="LastName Smith</Field><Field
Name="FirstName KESIA</Field><Field Name="Orderid 2011-00024642</Field><Field Name="lineNumber -51678</Field><Field Name="object_id -51678</Field><Field Name="orderID 2011-00024642</Field><Field
Name="item_description Purple Socks</Field></Object>
</ns0:Response>

They want the output to look like this
Last Name
order id
item id item description
item id item description
etc... until all the tiems for that order id are done the if there is another order id them display it with all of its items. I can cycle through the output now using a for each loop, but do not know how to do the for each of the sub items without
doing the entire line of data.

Thanks

Karl

View the full article
 
Back
Top