Package org.w3c.dom

Examples of org.w3c.dom.NamedNodeMap.removeNamedItem()


    NamedNodeMap attrMap = fNode.getAttributes();
    if (attrMap != null) {
      Node attribute = attrMap.getNamedItem(propertyObject.toString());
      if (attribute != null) {
        try {
          attrMap.removeNamedItem(propertyObject.toString());
        }
        catch (DOMException e) {
          if (e.code != DOMException.INVALID_MODIFICATION_ERR) {
            Logger.logException(e);
          }
View Full Code Here


          }
        }
      }
      if ((defValue != null) && (defValue.length() > 0)) {
        // implied values will be in the DOM, but not the source
        attrMap.removeNamedItem(property);
      }
      else {
        ((Attr) attrMap.getNamedItem(property)).setValue(""); //$NON-NLS-1$
      }
    }
View Full Code Here

                final org.w3c.dom.Node w3cNode = attrs.item(i);
                if (w3cNode instanceof Attr) {
                    final Attr attr = (Attr) w3cNode;
                    if (attr.getName().equalsIgnoreCase("type")) {
                        final String type = attr.getValue();
                        attrs.removeNamedItem(attr.getName());
                        return type;
                    }
                }
            }
        }
View Full Code Here

      Element sim = XMLArchiver.getSimFromArchiveDocument(doc);
     
      Document doc2 = db.newDocument();
      Node dup = doc2.importNode(sim, true);
      NamedNodeMap attributes = dup.getAttributes();
      attributes.removeNamedItem("xsi:noNamespaceSchemaLocation");
      doc2.appendChild(dup);
     
      /*
       * save to a temp file
       */
 
View Full Code Here

                final org.w3c.dom.Node w3cNode = attrs.item(i);
                if (w3cNode instanceof Attr) {
                    final Attr attr = (Attr) w3cNode;
                    if (attr.getName().equalsIgnoreCase("type")) {
                        final String type = attr.getValue();
                        attrs.removeNamedItem(attr.getName());
                        return type;
                    }
                }
            }
        }
View Full Code Here

    if (nsAttrs != null)
    {
      for (Iterator it = nsAttrs.iterator(); it.hasNext();)
      {
        String ns = (String) it.next();
        attributes.removeNamedItem(ns);
      }
    }
   
   
    if (attributes.getLength() > 3)
View Full Code Here

        if (attrs != null) {
            for (int i = attrs.getLength() - 1; i >= 0; i--) {
                Node attr = attrs.item(i);
                if (SdkConstants.XMLNS_URI.equals(attr.getNamespaceURI()) &&
                        TOOLS_URI.equals(attr.getNodeValue())) {
                    attrs.removeNamedItem(attr.getNodeName());
                } else if (TOOLS_URI.equals(attr.getNamespaceURI()) &&
                        MERGE_ATTR.equals(attr.getLocalName())) {
                    attrs.removeNamedItem(attr.getNodeName());
                }
            }
View Full Code Here

                if (SdkConstants.XMLNS_URI.equals(attr.getNamespaceURI()) &&
                        TOOLS_URI.equals(attr.getNodeValue())) {
                    attrs.removeNamedItem(attr.getNodeName());
                } else if (TOOLS_URI.equals(attr.getNamespaceURI()) &&
                        MERGE_ATTR.equals(attr.getLocalName())) {
                    attrs.removeNamedItem(attr.getNodeName());
                }
            }
            assert attrs.getNamedItemNS(TOOLS_URI, MERGE_ATTR) == null;
        }
View Full Code Here

        attributes.setNamedItem(attNode);
    }
   
    public static void removeAttribute( Node node, String attName ) {
        NamedNodeMap attributes=node.getAttributes();
        attributes.removeNamedItem(attName);               
    }
   
   
    /** Set or replace the text value
     */
View Full Code Here

        attributes.setNamedItem(attNode);
    }

    public static void removeAttribute(Node node, String attName) {
        NamedNodeMap attributes = node.getAttributes();
        attributes.removeNamedItem(attName);
    }

    /**
     * Set or replace the text value
     */
 
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.