Package org.w3c.dom

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


        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


        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

      String attribute = attributeName.toLowerCase();
      try {
        NodeList nl = XPathHelper.evaluateXpathExpression(dom, "//*[@" + attribute + "]");
        for (int i = 0; i < nl.getLength(); i++) {
          NamedNodeMap attributes = nl.item(i).getAttributes();
          attributes.removeNamedItem(attribute);
        }
      } catch (XPathExpressionException e) {
        LOGGER.warn("Error with StyleOracle: " + e.getMessage());
      } catch (DOMException e) {
        LOGGER.warn("Error with StyleOracle: " + e.getMessage());
View Full Code Here

        // Individual nodes
        e=addNoisyElement(doc,root,0);
        Attr a=addNoisyAttr(doc,e,0);
        a.setNodeValue("Updated A0 of E0, prepare to be acidulated.");
        NamedNodeMap nnm=e.getAttributes();
        nnm.removeNamedItem(a.getName());
        nnm.setNamedItem(a);

        // InsertedInto/RemovedFrom tests.
        // ***** These do not currently cross the Attr/Element barrier.
        // DOM spec is pretty clear on that, but this may not be the intent.
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

      String attribute = attributeName.toLowerCase();
      try {
        NodeList nl = XPathHelper.evaluateXpathExpression(dom, "//*[@" + attribute + "]");
        for (int i = 0; i < nl.getLength(); i++) {
          NamedNodeMap attributes = nl.item(i).getAttributes();
          attributes.removeNamedItem(attribute);
        }
      } catch (XPathExpressionException e) {
        LOGGER.warn("Error with StyleOracle: " + e.getMessage());
      } catch (DOMException e) {
        LOGGER.warn("Error with StyleOracle: " + e.getMessage());
View Full Code Here

                    }

                    if (removeXsiNil && attributes.getNamedItem("xsi:nil") != null) {
                        if (attributes.getLength() == 1
                                || (attributes.getLength() == 2 && attributes.getNamedItem("xmlns:xsi") != null)) {
                            attributes.removeNamedItem("xsi:nil");
                            attributes.removeNamedItem("xmlns:xsi");
                            removed = true;
                        }
                    }
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.