/** * Select all nodes that are selected by this XPath expression. If multiple nodes match, * multiple nodes will be returned. Nodes will be returned in document-order, * @param path the xpath expression * @param node the starting node * @return result of evaluating the xpath expression against node */ public static NodeList selectNodes(String path, Object node) { return selectNodes(path, node, null); }
/** * Select all nodes that are selected by this XPath expression. If multiple nodes match, * multiple nodes will be returned. Nodes will be returned in document-order, * @param path the xpath expression * @param node the starting node * @return result of evaluating the xpath expression against node */ public static NodeList selectNodes(String path, Object node) { return selectNodes(path, node, null); }
/** * Select all nodes that are selected by this XPath expression. If multiple nodes match, * multiple nodes will be returned. Nodes will be returned in document-order, * @param path * @param node * @return */ public static NodeList selectNodes(String path, Object node) { return selectNodes(path, node, null); }
/** * Select all nodes that are selected by this XPath expression. If multiple nodes match, * multiple nodes will be returned. Nodes will be returned in document-order, * @param path the xpath expression * @param node the starting node * @return result of evaluating the xpath expression against node */ public static NodeList selectNodes(String path, Object node) { return selectNodes(path, node, null); }
/** * Select all nodes that are selected by this XPath expression. If multiple nodes match, * multiple nodes will be returned. Nodes will be returned in document-order, * @param path * @param node * @return */ public static NodeList selectNodes(String path, Object node) { return selectNodes(path, node, null); }
/** * Select all nodes that are selected by this XPath expression. If multiple nodes match, multiple nodes will be * returned. Nodes will be returned in document-order, * * @param path * Path expression * @param node * The node object * @return Nodes in document-order */ public static List<Node> selectNodes(String path, Object node) { return selectNodes(path, node, null); }
public static Node selectNode(String path, Object node, Map<String, String> namespaces) { try { List<Node> nodes = selectNodes(path, node, namespaces); if (nodes.size() == 0) { return null; } return nodes.get(0); } catch (Exception e) { throw new RuntimeException(e); } }