I am using OSB and have one long XML containing parent and child node.
This is my XML
<XML>
<RefreshLaborApproval2RSP xmlns:XPathFunction="http://www.oracle.com/XSL/Transform/java/mol.prc.labourapproval.XPathFunction" xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition">
<ERRORCODE>
<VALUE>dfdfdf</VALUE>
</ERRORCODE>
<LABORRECORDS>
<LABORNAT>
<VALUE>569</VALUE>
</LABORNAT>
</LABORRECORDS>
<LABORRECORDS>
<LABORNAT>
<VALUE>218</VALUE>
</LABORNAT>
</LABORRECORDS>
</RefreshLaborApproval2RSP>
</XML>
When I use expression XML/*
its gives me the whole XML from <RefreshLaborApproval2RSP>
to </RefreshLaborApproval2RSP>
and kept the same in one variable called xmlparentNode.
And then when I use $xmlparentNode/LABORRECORDS
then I get only istLABORRECORDS
child element like below.
<LABORRECORDS>
<LABORNAT>
<VALUE>569</VALUE>
</LABORNAT>
</LABORRECORDS>
But I want all <LABORRECORDS>
child elements.
I dont know what exacly you want achieve, but you can:
Assign variable xmlparentNode,
Use For Each for example:
a) For Each Variable: Laborrecords
b) XPath: ./LABORRECORDS
c) In Variable: xmlparentNode
d) Index Variable: index
e) Count Variable: count
And then inside For Each do Assign expression: $Laborrecords in variable to get first value, then second.
Do some inserts or something with it.
I do not know if this will solve your problem.