Code example for QName

Methods: getLocalPart

0
 
        @Override public String getName() {
            return context + " " + select;
        } 
    } 
 
    /** 
     * Performs XPath variable resolution by using {@code var:name="value"} 
     * attributes from the given element. 
     */ 
    private static class ElementVariableResolver implements XPathVariableResolver {
        private final Element element;
        public ElementVariableResolver(Element element) {
            this.element = element;
        } 
        public Object resolveVariable(QName variableName) {
            return element.getAttribute("var:" + variableName.getLocalPart());
        } 
    } 
 
    private static List<Element> elementsOf(NodeList nodeList) {