Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have a xml data like below. I am using tExtractXMLField to extract xml to a row. But tExtractXMLField is only able to set one loop xpath query option, that means if I use /xml/header to get errcode and then I am not able to get the fields under xpath /xml/content/group.
My case is do different operation according to errcode.
Who can tell me how to design this?
Thanks in advance!
<xml>
<header>
<errcode>ERR000</errcode>
<msg>success</msg>
</header>
<content>
<group>
<creationtime>2016-03-22 13:35:46</creationtime>
<pk_supplier>1001QW10000000004CT2</pk_supplier>
<vbillcode>CD2016032200000001</vbillcode>
<modifiedtime>2016-03-22 13:36:17</modifiedtime>
<billmaker>1001QW1000000000017S</billmaker>
</group>
<group>
<creationtime>2016-03-23 16:05:30</creationtime>
<pk_supplier>1001QW10000000004CRS</pk_supplier>
<vbillcode>CD2016032300000006</vbillcode>
<modifiedtime>null</modifiedtime>
<billmaker>1001QW1000000000BT8L</billmaker>
</group>
</content>
</xml>
If error occurs , the response is like below
<xml>
<header>
<errcode>ERR001</errcode>
<msg>something wrong</msg>
</header>
<xml>
I 'd like to add if judgement after a extract errcode from xml, if the errcode equals err000 then extract the fields under xpath /xml/content/group to activemq , else just log it.