Java XML QName isSameNamespaceAndDifferentPrefix(QName qName, Element element)

Here you can find the source of isSameNamespaceAndDifferentPrefix(QName qName, Element element)

Description

is Same Namespace And Different Prefix

License

Open Source License

Declaration

public static boolean isSameNamespaceAndDifferentPrefix(QName qName, Element element) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.*;
import javax.xml.namespace.QName;

public class Main {
    public static boolean isSameNamespaceAndDifferentPrefix(QName qName, Element element) {
        return element.getNamespaceURI() != null && qName.getNamespaceURI().equals(element.getNamespaceURI())
                && (element.getPrefix() == null || !qName.getPrefix().equals(element.getPrefix()));
    }//from  www.j a  va 2 s.c  o m
}

Related

  1. isEventStartOrEndElementWithMatchingName(XMLEvent event, QName elementName)
  2. isJAXBElement(Class declaredType, QName name, Class scope, Object value)
  3. isPrimitiveIdlType(QName idlType)
  4. isPrimitiveType(final QName elementType)
  5. isSameNamespace(QName q1, QName q2)
  6. isTagName(Element element, QName name)
  7. isType(Map> types, QName name, QName attributeName)
  8. isValidQName(String localPart)
  9. isWildcardType(QName type)