Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Accounts for 30%, can be cached
- XPathFactory factory = XPathFactory.newInstance();
- // Negligible
- XPath xpath = factory.newXPath();
- // Negligible
- XPathExpression expression =
- xpath.compile("//SomeElementName");
- // Accounts for 70%
- String result = (String) expression
- .evaluate(document, XPathConstants.STRING);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement