Package org.w3c.dom

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


                    && e.getLocalName().equals("variable")){
                    String name = e.getAttribute("name");
                    //System.out.println(name+" = "+e.getAttribute("select"));
                    //test = e.getAttribute("select");
                    if(keys.contains(name)){
                        e.removeAttribute("select");
                        if (e.hasChildNodes()){
                            NodeList cl = e.getChildNodes();
                            for(int j=cl.getLength()-1;j>=0;j--){
                                e.removeChild(cl.item(j));
                            }
View Full Code Here


        // Moves the id attribute to the outermost
        // XML node, namely the node which denotes
        // the object boundaries in the file.
        String id = tmp.getAttribute("id");
        ((Element) node).setAttribute("id", id);
        tmp.removeAttribute("id");
      }
    }

    return node;
  }
View Full Code Here

        String id = value.getAttribute("id");

        if (id != null)
        {
          cell.setId(id);
          value.removeAttribute("id");
        }
      }
      else
      {
        cell.setId(((Element) node).getAttribute("id"));
View Full Code Here

        Node n = d.getDocumentElement().getFirstChild();
        while (n != null) {
            if (n instanceof Element) {
                Element e = (Element)n;
                if (e.getLocalName().equals("import")) {
                    e.removeAttribute("schemaLocation");
                }
            }
            n = n.getNextSibling();
        }
View Full Code Here

        if (splitNum > 1) {
            splitCell.setAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED,
              String.valueOf(splitNum));
        } else if (splitNum == 1) {
            splitCell.removeAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED);
        }
        if (orgNum > 1) {
            orgCell.setAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED,
View Full Code Here

        Node n = d.getDocumentElement().getFirstChild();
        while (n != null) {
            if (n instanceof Element) {
                Element e = (Element)n;
                if (e.getLocalName().equals("import")) {
                    e.removeAttribute("schemaLocation");
                }
            }
            n = n.getNextSibling();
        }
View Full Code Here

        properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
        Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);

        XPathExpression xPathExpression = getXPath("/soap:Envelope/soap:Header/wsse:Security/xenc:EncryptedKey");
        Element encryptedKeyElement = (Element) xPathExpression.evaluate(securedDocument, XPathConstants.NODE);
        encryptedKeyElement.removeAttribute("Id");
        encryptedKeyElement.setAttributeNS(null, "Id", "G2");

        xPathExpression = getXPath(".//dsig:X509Data");
        Element keyIdentifierElement = (Element) xPathExpression.evaluate(encryptedKeyElement, XPathConstants.NODE);
        Element securityTokenReferenceElement = (Element) keyIdentifierElement.getParentNode();
View Full Code Here

        Element referenceElement = securedDocument.createElementNS(WSSConstants.TAG_wsse_Reference.getNamespaceURI(), WSSConstants.TAG_wsse_Reference.getLocalPart());
        referenceElement.setAttributeNS(null, "URI", "#G1");
        securityTokenReferenceElement.appendChild(referenceElement);

        Element clonedEncryptedElement = (Element) encryptedKeyElement.cloneNode(true);
        clonedEncryptedElement.removeAttribute("Id");
        clonedEncryptedElement.setAttributeNS(null, "Id", "G1");

        xPathExpression = getXPath(".//wsse:Reference");
        Element newReferenceElement = (Element) xPathExpression.evaluate(clonedEncryptedElement, XPathConstants.NODE);
        newReferenceElement.removeAttribute("URI");
View Full Code Here

        clonedEncryptedElement.removeAttribute("Id");
        clonedEncryptedElement.setAttributeNS(null, "Id", "G1");

        xPathExpression = getXPath(".//wsse:Reference");
        Element newReferenceElement = (Element) xPathExpression.evaluate(clonedEncryptedElement, XPathConstants.NODE);
        newReferenceElement.removeAttribute("URI");
        newReferenceElement.setAttributeNS(null, "URI", "#G2");

        Element securityHeaderNode = (Element) encryptedKeyElement.getParentNode();
        securityHeaderNode.insertBefore(clonedEncryptedElement, encryptedKeyElement);
View Full Code Here

  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element augmentElement = dumper.writeAugmentPTA(
        new ProgressDecorator.AugmentPTAData(RestartLearningEnum.restartSOFT,sequence,true,null));
    augmentElement.removeAttribute(ELEM_KINDS.ATTR_KIND.name());
    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
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.