Code example for DOMException

0
            if (!DocumentImpl.isXMLIdentifier(prefix)) {
                throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName);
            } 
 
            if (!DocumentImpl.isXMLIdentifier(localName)) {
                throw new DOMException(DOMException.INVALID_CHARACTER_ERR, qualifiedName);
            } 
        } else { 
            if (!DocumentImpl.isXMLIdentifier(qualifiedName)) {
                throw new DOMException(DOMException.INVALID_CHARACTER_ERR, qualifiedName);
            } 
        } 
         
        this.qualifiedName = qualifiedName;
        this.publicId = publicId;
        this.systemId = systemId;
    } 
 
    @Override 
    public String getNodeName() {
        return qualifiedName;