Map<String, String> ns = new HashMap<String, String>();
ns.put("a1", "http://book.acme.com");
ns.put("a2", "http://book.customer.cxf.apache.org/");
Document doc = XMLUtils.parse(in);
XPathUtils xp = new XPathUtils(ns);
assertTrue(xp.isExist("/a2:getBookResponse", doc.getDocumentElement(), XPathConstants.NODE));
assertTrue(xp.isExist("/a2:getBookResponse/a2:Book", doc.getDocumentElement(), XPathConstants.NODE));
assertTrue(xp.isExist("/a2:getBookResponse/a2:Book/a1:id",
doc.getDocumentElement(), XPathConstants.NODE));
assertEquals("123", xp.getValue("/a2:getBookResponse/a2:Book/a1:id",
doc.getDocumentElement(), XPathConstants.STRING));
assertEquals("CXF in Action", xp.getValue("/a2:getBookResponse/a2:Book/a1:name",
doc.getDocumentElement(), XPathConstants.STRING));
}