Please find below xml payload and what will be the xpath for fetching department/department id/etc. with same name value pairs.
XML Payload:
<ns2:BeneficiaryDetails>
<ns2:attributes>
<ns2:Name>Department</ns2:Name>
<ns2:Value>IT</ns2:Value>
</ns2:attributes>
<ns2:attributes>
<ns2:Name>Department ID</ns2:Name>
<ns2:Value>37266</ns2:Value>
</ns2:attributes>
<ns2:attributes>
<ns2:Name>Department Owner</ns2:Name>
<ns2:Value>James Turbott</ns2:Value>
</ns2:attributes>
</ns2:BeneficiaryDetails>
Tried below Xpath didn't worked.
XPath:
/task:task/task:payload/ns1:BeneficiaryDetails/ns1:attributes[Name='Department']/Value