Package org.w3c.dom

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


    for ( int j = 0; j < attributes.size(); j ++ ) {
      Attr tempAttr = attributes.get(j);
      Attr attr = element.getAttributeNode(tempAttr.getName());
      Element owner = (Element)attr.getOwnerElement();
      owner.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + getPrefix( attr.getNodeValue() ), attr.getNodeValue());
      owner.removeAttributeNode(attr);
    }
    String prefix = getPrefix( element.getNamespaceURI() );
    if ( prefix != null ) {
        element.setPrefix( prefix );
    }
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

                            } else {
                                node.setNodeValue(stringValue);
                                if(((node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.CDATA_SECTION_NODE)) && parentElement != null) {
                                    Attr nil = parentElement.getAttributeNodeNS(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE);
                                    if(nil != null) {
                                        parentElement.removeAttributeNode(nil);
                                    }
                                }
                            }
                        }
                    }
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

                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

                    break;
                case MutationEvent.MODIFICATION:
                    attr.setValue(mutEvent.getNewValue());
                    break;
                case MutationEvent.REMOVAL:
                    targetElem.removeAttributeNode(attr);
                    break;
            }
        }
        else if (type.equals("DOMCharacterDataModified"))
        {
View Full Code Here

                    String localName = attr.getLocalName(); // Fundamental llamar a getLocalName
                    if (localName.equals("include"))
                    {
                        String fragName = attr.getValue();
                        processIncludeReplacingNode(nodeElem,fragName,request,response);
                        nodeElem.removeAttributeNode(attr);
                    }
                    else if (localName.equals("includeInside"))
                    {
                        String fragName = attr.getValue();
                        processIncludeInsideNode(nodeElem,fragName,request,response);
View Full Code Here

                    }
                    else if (localName.equals("includeInside"))
                    {
                        String fragName = attr.getValue();
                        processIncludeInsideNode(nodeElem,fragName,request,response);
                        nodeElem.removeAttributeNode(attr);
                    }
                    else if (localName.equals("comment"))
                    {
                        nodeElem.removeAttributeNode(attr);
                    }
View Full Code Here

                        processIncludeInsideNode(nodeElem,fragName,request,response);
                        nodeElem.removeAttributeNode(attr);
                    }
                    else if (localName.equals("comment"))
                    {
                        nodeElem.removeAttributeNode(attr);
                    }
                    // Pueden ser otros atributos con prefijo itsnat:
                }
            }
         }
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.