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


    Node attribute = attributes.getNamedItem("class");
    String name;
    // 检查是否有class属性, 如果没有将使用节点名称做为对象名称
    if (attribute != null) {
      name = attribute.getNodeValue();
      attributes.removeNamedItem("class");
    } else {
      name = node.getNodeName();
    }

    try {
View Full Code Here

        Node attr;
        for (int i = 0; i < numAttrs; ++i)
        {
            attr = attrs.item(0);
            properties.put(attr.getNodeName(), attr.getNodeValue());
            attrs.removeNamedItem(attr.getNodeName());
        }
    }

    protected void parseChild(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
    {
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

          {
            if( attributes.getLength() == 1
                || ( attributes.getLength() == 2 && attributes.getNamedItem( "xmlns:xsi" ) != null ) )
            {
              attributes.removeNamedItem( "xsi:nil" );
              attributes.removeNamedItem( "xmlns:xsi" );
              removed = true;
            }
          }

          if( attributes.getLength() == 0
View Full Code Here

                if (cc.canConvertAttribute(OfficeConstants.TAG_TABLE_CELL,
                                           attr.getNodeName()) &&
                    !attr.getNodeName().equals(
                        OfficeConstants.ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED)) {

                    attrNodes.removeNamedItem(attr.getNodeName());
                } else {
                    i++;
                }
            }
        }
View Full Code Here

      String[] nv = tests[i].split(DexterityConstants.ATTR_SEP, 2);
      Node a = attr.getNamedItem(nv[0]);
      String value = null;
      if (a != null) {
        value = a.getNodeValue();
        attr.removeNamedItem(nv[0]);
      }
      String nref = (nv.length > 1) ? nv[1] : "";

      if (nref.startsWith("!")) {
        nref = nref.substring(1);
View Full Code Here

    String[] nv = test.split(DexterityConstants.ATTR_SEP, 2);
    Node a = attr.getNamedItem(nv[0]);
    String value = null;
    if (a != null) {
      value = a.getNodeValue();
      attr.removeNamedItem(nv[0]);
    }
    String nref = (nv.length > 1) ? nv[1] : "";

    if (nref.startsWith("!")) {
      nref = nref.substring(1);
View Full Code Here

    if(args[0].startsWith("!")) {
      // make a strict and insert it previously
      args[0] = args[0].substring(1);
      Node nn = element.cloneNode(true);
      NamedNodeMap attr = nn.getAttributes();
      attr.removeNamedItem(name);
      Node parent = element.getParentNode();
      parent.insertBefore(nn, element);
    }
   
    String v;
View Full Code Here

      String value = null;
      Node a = attr.getNamedItem(name);
      if(a != null)
      {
        value = a.getNodeValue();
        attr.removeNamedItem(name);
      }
      this.sequencer.startTest(test);     

      // no concept of default value. it appears or not dependent on conditional
      sequencer.mapAttribute(name,
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.