Package org.w3c.dom

Examples of org.w3c.dom.Element.removeAttributeNode()


        Attr plfAttribNode = plfNode.getAttributeNode( attributeName );

        if ( attribNode == null ) // attribute deleted
        {
            if ( plfAttribNode != null )
                plfNode.removeAttributeNode( plfAttribNode );
        }
        else // attribute added or edited so add and/or edit
        {
            if ( plfAttribNode == null )
            {
View Full Code Here


                AttrImpl at = (AttrImpl) n;

                // dettach attr from element
                Element el = at.getOwnerElement();
                if (el != null) {
                    el.removeAttributeNode(at);
                }
                if (n instanceof AttrNSImpl) {
                    ((AttrNSImpl) at).rename(namespaceURI, name);
                    // reattach attr to element
                    if (el != null) {
View Full Code Here

                AttrImpl at = (AttrImpl) n;
               
                // detach attr from element
                Element el = at.getOwnerElement();
                if (el != null) {
                    el.removeAttributeNode(at);
                }
                if (n instanceof AttrNSImpl) {
                    ((AttrNSImpl) at).rename(namespaceURI, name);
                    // reattach attr to element
                    if (el != null) {
View Full Code Here

               
                NamedNodeMap atts = cloneNode.getAttributes();
                for (int x = 0; x < atts.getLength(); x++) {
                    Attr attr = (Attr)atts.item(x);
                    if (ToolConstants.NS_JAXB_BINDINGS.equals(attr.getNamespaceURI())) {
                        cloneNode.removeAttributeNode(attr);
                        atts = cloneNode.getAttributes();
                        x = -1;
                    }
                }
                appinfoNode.appendChild(cloneNode);
View Full Code Here

                AbstractAttrNS a = (AbstractAttrNS) n;
                Element e = a.getOwnerElement();

                // Remove attribute from element
                if (e != null) {
                    e.removeAttributeNode(a);
                }

                // Update name
                a.namespaceURI = ns;
                a.nodeName = qn;
View Full Code Here

                AbstractAttr a = (AbstractAttr) n;
                Element e = a.getOwnerElement();

                // Remove attribute from element and create new one
                if (e != null) {
                    e.removeAttributeNode(a);
                }
                AbstractAttr a2 = (AbstractAttr) createAttributeNS(ns, qn);

                // Move attribute value across
                a2.setNodeValue(a.getNodeValue());
View Full Code Here

               
                NamedNodeMap atts = cloneNode.getAttributes();
                for (int x = 0; x < atts.getLength(); x++) {
                    Attr attr = (Attr)atts.item(x);
                    if (ToolConstants.NS_JAXB_BINDINGS.equals(attr.getNamespaceURI())) {
                        cloneNode.removeAttributeNode(attr);
                        atts = cloneNode.getAttributes();
                        x = -1;
                    }
                }
                appinfoNode.appendChild(cloneNode);
View Full Code Here

                AttrImpl at = (AttrImpl) n;

                // dettach attr from element
                Element el = at.getOwnerElement();
                if (el != null) {
                    el.removeAttributeNode(at);
                }
    if (n instanceof AttrNSImpl) {
        ((AttrNSImpl) at).rename(namespaceURI, name);
                    // reattach attr to element
                    if (el != null) {
View Full Code Here

    }
   
    protected Assertion cloneMandatory() {
        Element e = (Element)element.cloneNode(true);
        if (isOptional()) {
            e.removeAttributeNode(e.getAttributeNodeNS(PolicyConstants.getNamespace(),
                                                   PolicyConstants.getOptionalAttrName()));
        }
        return new XmlPrimitiveAssertion(e);       
    }
}
View Full Code Here

                AttrImpl at = (AttrImpl) n;
               
                // dettach attr from element
                Element el = at.getOwnerElement();
                if (el != null) {
                    el.removeAttributeNode(at);
                }
                if (n instanceof AttrNSImpl) {
                    ((AttrNSImpl) at).rename(namespaceURI, name);
                    // reattach attr to element
                    if (el != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.