xpath - xpath3 issue in mule -
here incoming payload.
<?xml version="1.0" encoding="utf-8"?> <detail><ns1:siperianrequestfault xmlns:ns1="urn:siperian.api"> <ns1:requestname>searchquery</ns1:requestname> <ns1:errorcode>sip-18018</ns1:errorcode> <ns1:errormessage>sip-18018: request not recognized user profile providers. review server log more details.</ns1:errormessage> </ns1:siperianrequestfault></detail> when query
xpath3('//detail')
here output
searchquerysip-18018sip-18018: request not recognized user profile providers.review server log more details. but want extract errorcode, errormessage etc.
please use #[xpath3('/detail/*:siperianrequestfault/*:errorcode')] errorcode. have used *: defining namespace wildcard. if want use namespace can define as
<mulexml:namespace-manager includeconfignamespaces="true"> <mulexml:namespace prefix="ns1" uri="urn:siperian.api" /> </mulexml:namespace-manager> then expression #[xpath3('/detail/ns1:siperianrequestfault/ns1:errorcode')]
hope helps.
Comments
Post a Comment