Hi All.
I'm trying to search an element in the xml using selectSingleNode() function of org.jdom.xpath. The function returns me null and I'm sure that I'm not building the xpath expression correctly. Below is an example of my XML:
<?xml version = "1.0" encoding = "UTF-8"?>
<ContainerBatch xmlns= "http://xmlns.example.com/unique/default/namespace/10012">
<Batches>
<BatchData xmlns = "http://xmlns.example.com/unique/default/namespace/1001">
</BatchData>
</Batches>
<Containers>
<ContainerData xmlns="http://xmlns.example.com/unique/default/namespace/1002">
<ContainerItems>
<Item>
<BatchID>10200-1</BatchID>
</Item>
<Item>
<BatchID>10200-1</BatchID>
</Item>
</ContainerItems>
What expression should I give in order to search
BatchID of the second
Item?
Many thanks in advance for your responses.
Regards,
Ashwani