I have the below document. I am trying to get the test:Category
at ABCSite[0]
.
Tried the XPath $ABCCustomerHierarchy(//ata:ABCSite[0])/test:Customer/test:CustomerID/test:Category
, but I got some XPath exception.
Can anybody tell me the right XPath here please?
<test:ABCCustomerHierarchy xmlns:test="http://wwwin.test.com/testschema">
<test:ABCSite>
<test:Customer>
<test:CustomerID>
<test:ID>110984181</test:ID>
<test:Category>ABC_Customer</test:Category>
</test:CustomerID>
</test:Customer>
<test:CustomerReferences>
<test:CustomerID>
<test:ID>17808</test:ID>
<test:Category>KLM_CUSTOMER</test:Category>
</test:CustomerID>
<test:CustomerID>
<test:ID>17808</test:ID>
<test:Category>XYZ_Customer</test:Category>
</test:CustomerID>
<test:CustomerID>
<test:ID>17808</test:ID>
<test:Category>PQR_CUSTOMER</test:Category>
</test:CustomerID>
</test:CustomerReferences>
</test:ABCSite>
<test:ABCSite>
<test:Customer>
<test:CustomerID>
<test:ID>17808</test:ID>
<test:Category>XYZ_Customer</test:Category>
</test:CustomerID>
</test:Customer>
<test:CustomerReferences>
<test:CustomerID>
<test:ID>17808</test:ID>
<test:Category>PQR_CUSTOMER</test:Category>
</test:CustomerID>
</test:CustomerReferences>
</test:ABCSite>
</test:ABCCustomerHierarchy>