In one of our projects, we hadto do an xpath expression in an orchestration to find a value from a nodes subnode, where another subnode has a specific value.
So our input is like this:
<Root> <Delivery> <DeliveryType>Home</DeliveryType> <BoxInfo> <BoxID>22</BoxID> </BoxInfo> </Delivery> <Delivery> <DeliveryType>Work</DeliveryType> <BoxInfo> <BoxID>35</BoxID> </BoxInfo> </Delivery> <Delivery> <DeliveryType>Home</DeliveryType> <BoxInfo> <BoxID>12</BoxID> <BoxID>87</BoxID> </BoxInfo> </Delivery> <Boxes> <Box> <ID>12</ID> <Contents>Envelopes</Contents> </Box> <Box> <ID>22</ID> <Contents>Surface Pro 2</Contents> </Box> <Box> <ID>35</ID> <Contents>Stickers</Contents> </Box> <Box> <ID>87</ID> <Contents>Stamps</Contents> </Box> </Boxes> </Root> |
Now what we wanted to do, is to have the ID’s of the boxes, where the delivery type was Home.
Continue reading