Package org.w3c.dom

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


    else if( wsTimestamp != null && context.getProperty( WSS_TIMESTAMP_TOKEN ) != null )
    {
      Element elm = ( Element )context.getProperty( WSS_TIMESTAMP_TOKEN );
      context.removeProperty( WSS_TIMESTAMP_TOKEN );
      Element parentNode = ( Element )elm.getParentNode();
      parentNode.removeChild( elm );
      if( XmlUtils.getChildElements( parentNode ).getLength() == 0 )
        parentNode.getParentNode().removeChild( parentNode );
    }

    updateWssDocument( context, doc );
View Full Code Here


      for( int i = 0; i < headerProps.getLength(); i++ )
      {
        Node headerChild = headerProps.item( i );
        if( headerChild.getNamespaceURI().equals( wsaVersionNameSpace ) )
        {
          header.removeChild( headerChild );
        }
      }
      content = xmlContentObject.xmlText();
    }
    catch( XmlException e )
View Full Code Here

      for( int i = 0; i < headerProps.getLength(); i++ )
      {
        Node headerChild = headerProps.item( i );
        if( headerChild.getNamespaceURI().equals( WSSE_NAMESPACE ) )
        {
          header.removeChild( headerChild );
        }
      }
      content = xmlContentObject.xmlText();
    }
    catch( XmlException e )
View Full Code Here

        this.propertyName = propertyName;
    }

    public void processElement(Element element, BeanDefinitionReader beanDefinitionReader) {
        Element bean = (Element) element.getParentNode();
        bean.removeChild(element);
       
        String name = propertyName;
        if (name == null) {
            name = getElementNameToPropertyName(element);
        }
View Full Code Here

            Element fragElt =
                    (Element) contextDocument.importNode(d.getDocumentElement(), true);
            DocumentFragment result = contextDocument.createDocumentFragment();
            Node child = fragElt.getFirstChild();
            while (child != null) {
                fragElt.removeChild(child);
                result.appendChild(child);
                child = fragElt.getFirstChild();
            }
            return result;
        } catch (SAXException se) {
View Full Code Here

            collectionElement.setAttributeNS(null, ATTRIBUTE_UUID, getDelegate().getUUID());
        }
        Element[] existingDocumentElements = helper.getChildren(collectionElement,
                ELEMENT_DOCUMENT);
        for (int i = 0; i < existingDocumentElements.length; i++) {
            collectionElement.removeChild(existingDocumentElements[i]);
        }

        collectionElement.setAttribute(ATTRIBUTE_TYPE, getType());
       
        collectionElement.setAttribute(ATTRIBUTE_HREF, getHref());
View Full Code Here

        collectionElement.normalize();

        NodeList emptyTextNodes = XPathAPI.selectNodeList(collectionElement, "text()");
        for (int i = 0; i < emptyTextNodes.getLength(); i++) {
            Node node = emptyTextNodes.item(i);
            node = collectionElement.removeChild(node);
        }

        Document[] documents = getDocuments();
        for (int i = 0; i < documents.length; i++) {
            Element documentElement = createDocumentElement(documents[i], helper);
View Full Code Here

        Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);

        XPathExpression xPathExpression = getXPath("/soap:Envelope/soap:Body");
        Element bodyElement = (Element) xPathExpression.evaluate(securedDocument, XPathConstants.NODE);
        Element soapEnvElement = (Element) bodyElement.getParentNode();
        soapEnvElement.removeChild(bodyElement);

        Element newBody = securedDocument.createElementNS(WSSConstants.NS_SOAP11, WSSConstants.TAG_soap_Body_LocalName);
        Element operationElement = securedDocument.createElementNS("http://schemas.xmlsoap.org/wsdl/", "definitions");
        newBody.appendChild(operationElement);
        soapEnvElement.appendChild(newBody);
View Full Code Here

            wsSign.build(
                doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
                "security", secHeader
            );
        Element assertionElement = (Element) samlAssertion.getElement().cloneNode(true);
        assertionElement.removeChild(assertionElement.getFirstChild());
        secHeader.getSecurityHeader().appendChild(assertionElement);

        if (LOG.isDebugEnabled()) {
            LOG.debug("SAML 1.1 Authn Assertion (sender vouches):");
            String outputString =
View Full Code Here

        for (int i = 0; i < children.getLength(); i++)
        {
            org.w3c.dom.Node nd = children.item(i);
            if (nd.getNodeType() == org.w3c.dom.Node.TEXT_NODE)
            {
                elem.removeChild(nd);
            }
        }

        if (value != null)
        {
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.