I am new to XSLT. I need help comparing the value of two nodes' values in XML.
My sample XML:
<?xml version="1.0" encoding="utf-8"?>
<G1Export xmlns="">
<AgencyGroup xmlns="">
<Agency xmlns="">
<RecordType xmlns="">RecordType</RecordType>
<OrgId xmlns="">123</OrgId>
</Agency>
</AgencyGroup>
<BranchGroup xmlns="">
<BranchCode xmlns="">
<OrgId xmlns="">123</OrgId>
</BranchCode>
</BranchGroup>
</G1Export>
In the above XML file I need to compare the values of the OrgId
node under the <AgencyGroup>
node to the one under the <BranchGroup>
node.
I tried to used the compare()
method, but it gives me the reult of 1.
The actual result must be 0 (for equal). I am using XSLT 2.