I have the following xml

<?xml version="1.0" encoding="UTF-8"?>
<or:AddOrder xmlns="urn:uk.org.telcob2b/tML/BT-Order-v11-0">
<Order>
<BuyersID>test_final_1</BuyersID>
<utcc:IssueDateTime>2009-025T13:23:45</utcc:IssueDateTime>
<utcc:KCIType>B2B</utcc:KCIType>
</Order>
</or:AddOrder>
In the above xml,I want to retrieve the value of <Buyer'sId> and <utcc:IssueDateTime> (ie) test_final_1,2009-025T13:23:45 respectively.

I have written the following code


DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
File xmlFile2 = new File("D:\\XML_Utility\\Version 11\\SL_Basic\\SL_Order.xml");
factory.setNamespaceAware(true);
// System.out.println(xmlFile2.getAbsolutePath());
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(xmlFile2);

XPath xpath = XPathFactory.newInstance().newXPath();
XPathExpression expr = xpath.compile("/or:AddOrder/Order/BuyersID");
Object result =
expr.evaluate(doc, XPathConstants.NODE);
System.out.println(result);

But the result is displaying as null....Please help me in this regard.