Package org.w3c.dom

Examples of org.w3c.dom.Node.cloneNode()


                       DataType targetDataType,
                       Operation operation,
                       Operation targetOperation) {
        if (Node.class.isAssignableFrom(source.getClass())) {
            Node nodeSource = (Node)source;
            return nodeSource.cloneNode(true);
        }
        return super.copy(source, dataType, targetDataType, operation, targetOperation);
    }

    @Override
View Full Code Here


                    nodes.add(attrs.item(i));
                }
                for (int i = 0; i < nodes.size(); i++) {
                    Node node = nodes.get(i);
                    if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
                        newElement.setAttributeNodeNS((Attr)node.cloneNode(true));
                    } else {
                        newElement.appendChild(nodes.get(i));
                    }
                }
                return newElement;
View Full Code Here

    }

    public Object copy(Object source) {
        if (Node.class.isAssignableFrom(source.getClass())) {
            Node nodeSource = (Node) source;
            return nodeSource.cloneNode(true);
        }
        return super.copy(source);
    }
}
View Full Code Here

      xmlCipher.doFinal(doc, encBodyData, content);
     
      if(parentEncBody.getLocalName().equals(WSConstants.ENCRYPTED_HEADER)
          && parentEncBody.getNamespaceURI().equals(WSConstants.WSSE11_NS)) {
        Node decryptedHeader = parentEncBody.getFirstChild();
        Element decryptedHeaderClone = (Element)decryptedHeader.cloneNode(true);
              String sigId = decryptedHeaderClone.getAttributeNS(WSConstants.WSU_NS, "Id");
       
              if ( sigId == null || sigId.equals("") ) {
                      String id = ((Element)parentEncBody).getAttributeNS(WSConstants.WSU_NS, "Id");                        
                      String wsuPrefix = WSSecurityUtil.setNamespace(decryptedHeaderClone,
View Full Code Here

       
        if(parent.getLocalName().equals(WSConstants.ENCRYPTED_HEADER)
                && parent.getNamespaceURI().equals(WSConstants.WSSE11_NS)) {
           
            Node decryptedHeader = parent.getFirstChild();
            Element decryptedHeaderClone = (Element)decryptedHeader.cloneNode(true);           
            String sigId = decryptedHeaderClone.getAttributeNS(WSConstants.WSU_NS, "Id");
           
            if ( sigId == null || sigId.equals("")) {
                String id = ((Element)parent).getAttributeNS(WSConstants.WSU_NS, "Id");
               
View Full Code Here

            Node d;
            if (defaults != null &&
                (d = defaults.getNamedItem(name)) != null &&
                findNamePoint(name, index+1) < 0) {

                NodeImpl clone = (NodeImpl)d.cloneNode(true);
                clone.ownerNode = ownerNode;
                clone.isOwned(true);
                clone.isSpecified(false);
                nodes.setElementAt(clone, index);
                if (attr.isIdAttribute()) {
View Full Code Here

            if (defaults != null
                && (d = defaults.getNamedItem(nodeName)) != null)
                {
                    int j = findNamePoint(nodeName,0);
                    if (j>=0 && findNamePoint(nodeName, j+1) < 0) {
                        NodeImpl clone = (NodeImpl)d.cloneNode(true);
                        clone.ownerNode = ownerNode;
                        // REVISIT: can we assume that if we reach here it is
                        // always attrNSImpl
                        if (clone instanceof AttrNSImpl) {
                            // we must rely on the name to find a default attribute
View Full Code Here

    @Override
    public Object copy(Object source) {
        if (Node.class.isAssignableFrom(source.getClass())) {
            Node nodeSource = (Node) source;
            return nodeSource.cloneNode(true);
        }
        return super.copy(source);
    }

    @Override
View Full Code Here

            Node d;
            if (defaults != null &&
                (d = defaults.getNamedItem(name)) != null &&
                findNamePoint(name, index+1) < 0) {

                NodeImpl clone = (NodeImpl)d.cloneNode(true);
                clone.ownerNode = ownerNode;
                clone.isOwned(true);
                clone.isSpecified(false);
                nodes.setElementAt(clone, index);
                if (attr.isIdAttribute()) {
View Full Code Here

            if (defaults != null
                && (d = defaults.getNamedItem(nodeName)) != null)
                {
                    int j = findNamePoint(nodeName,0);
                    if (j>=0 && findNamePoint(nodeName, j+1) < 0) {
                        NodeImpl clone = (NodeImpl)d.cloneNode(true);
                        clone.ownerNode = ownerNode;
                        // REVISIT: can we assume that if we reach here it is
                        // always attrNSImpl
                        if (clone instanceof AttrNSImpl) {
                            // we must rely on the name to find a default attribute
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.