I have a variable set value as "Active." Based on the value of a variable, I want to select a node in the payload.
If I give values directly in xpath, it's work.
When I'm trying to use variables inside an xpath, like @Status = vars.xstatus. It returns a null value [].
Mule 4 flow:
<flow name="var_xpath_testFlow" doc:id="406270fb-17e7-48e9-a33a-f7a0197f8e05" >
<http:listener doc:name="Listener" doc:id="662f2277-859f-4516-974b-de7cceeb5b40" config-ref="HTTP_Listener_config" path="/vartest"/>
<set-variable value="Active" doc:name="Set Variable" doc:id="12370458-bb32-4709-b509-acc1e5f50b94" variableName="xstatus"/>
<xml-module:xpath-extract doc:id="6027ebad-f81d-4df1-8234-3d8dab04b129" config-ref="XML_Config" xpath="/DTOApplication/DTOLocation[@Status=vars.xstatus ]" target="xvalue"/>
<logger level="INFO" doc:name="Logger" doc:id="f495b0bf-f8cb-43be-b4d9-d069758e4028" message="#[vars.xvalue]"/>
</flow>
XPATH expression:
/DTOApplication/DTOLocation[@Status='Active']
XML payload: https://github.com/Manikandan99/rate-dtostep/blob/master/request.xml
how to use variables in XPath Mule 4?

