org.w3c.dom.Document doc =
db.parse(new java.io.ByteArrayInputStream(inputStr.getBytes()));
XPathFactory xpf = XPathFactory.newInstance();
XPath xpath = xpf.newXPath();
xpath.setNamespaceContext(new DSNamespaceContext());
String expression = "//ds:Transforms[1]";
Element transformsElement =
(Element) xpath.evaluate(expression, doc, XPathConstants.NODE);