<splitter evaluator="xpath" expression="/healthcare/plans" doc:name="splitter" /> <enricher source="#[flowvars.tempid]" target="#[xpath('/plans/planid').text ]" doc:name="message enricher"> above code working fine using xpath
but below code using xpath3 not picking text
<splitter expression="#[xpath3('/healthcare/plans', payload, 'nodeset')]" doc:name="splitter" /> <enricher source="#[flowvars.tempid]" target="#[xpath3('/plans/planid').text ]" doc:name="message enricher">
theres few things wrong config:
by default
xpath3
returns string, no need call.text
. more on here: http://blogs.mulesoft.org/mule-3-6-xml-xpath-xslt-xquery3/the source , target expressions wrong way round. if want store result of xpath expression in a variable
target
variable should ,source
source of value in case xpath expression.your xpath expression wrong. no need
/plans
xml split individual plan nodes.
try this:
<splitter expression="#[xpath3('/healthcare/plans/*', payload, 'nodeset')]" doc:name="splitter" /> <enricher source="#[xpath3('planid')]" target="#[flowvars.tempid]" doc:name="message enricher">
Comments
Post a Comment