Code example for Node

Methods: getLocalNamegetNamespaceURIgetPrefix

0
     *  
     * @return the QName for the element or null if the element was null 
     */ 
    public static QName getNodeQName(Node domNode) {
        if (domNode != null) {
            return constructQName(domNode.getNamespaceURI(), domNode.getLocalName(), domNode.getPrefix());
        } 
 
        return null; 
    } 
     
    /** 
     * Gets the lcoale currently active for the element.  This is done by looking for an xml:lang attribute  
     * and parsing its content.  If no xml:lang attribute is present the default locale is returned.  This method  
     * only uses the language primary tag, as defined by RFC3066. 
     *  
     * @param element element to retrieve local information for 
     *  
     * @return the active local of the element 
     */ 
    public static Locale getLanguage(Element element) {