Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMNode.detach()


        // if we already have other text nodes remove them
        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        TextImpl textNode = (TextImpl) (this.ownerNode)
View Full Code Here


    init(type);
    if (value != null) {
      OMNode child = this.getFirstOMChild();
      while (child != null) {
          if (child.getType() == OMNode.TEXT_NODE) {
              child.detach();
          }
          child = child.getNextOMSibling();
      }
      getOMFactory().createOMText(this, value);
    } else
View Full Code Here

    complete();
    if (text != null) {
      OMNode child = this.getFirstOMChild();
      while (child != null) {
          if (child.getType() == OMNode.TEXT_NODE) {
              child.detach();
          }
          child = child.getNextOMSibling();
      }
      getOMFactory().createOMText(this, text);
    } else
View Full Code Here

    init(type);
    if (value != null) {
      OMNode child = this.getFirstOMChild();
      while (child != null) {
          if (child.getType() == OMNode.TEXT_NODE) {
              child.detach();
          }
          child = child.getNextOMSibling();
      }
      getOMFactory().createOMText(this, value);
    } else
View Full Code Here

        } else {
            assertFalse(root.isComplete());
        }
        OMNode oldFirstChild = root.getFirstOMChild();
        assertNotNull(oldFirstChild);
        oldFirstChild.detach();
        OMNode newFirstChild = root.getFirstOMChild();
        assertNotNull(newFirstChild);
        assertNotSame(oldFirstChild, newFirstChild);
    }
}
View Full Code Here

                    elementToProcess.removeAttribute(hrefAttribute);
                    OMElement clonedReferenceElement = getClonedOMElement(referedOMElement, omFactory);
                    OMNode omNode = null;
                    for (Iterator iter = clonedReferenceElement.getChildren(); iter.hasNext();) {
                        omNode = (OMNode) iter.next();
                        elementToProcess.addChild(omNode.detach());
                    }

                    // add attributes
                    OMAttribute omAttribute = null;
                    for (Iterator iter = clonedReferenceElement.getAllAttributes(); iter.hasNext();) {
View Full Code Here

        SOAPBody body = root.getBody();
        getNumDetailBlocks(); // Forces parse of existing detail blocks
        getNumBodyBlocks()// Forces parse over body
        OMNode child = body.getFirstOMChild();
        while (child != null) {
            child.detach();
            child = body.getFirstOMChild();
        }

        // Add a SOAPFault to the body.
        SOAPFault soapFault = XMLFaultUtils.createSOAPFault(xmlFault, body, false);
View Full Code Here

                          header.declareNamespace(ns);
                        }
                        Iterator children = element.getChildElements();
                        while (children.hasNext()) {
                          OMNode child = (OMNode)children.next();
                          child.detach();
                          header.addChild(child);
                        }
                       
                        element.detach();
                       
View Full Code Here

        // if we already have other text nodes remove them
        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        TextImpl textNode = (TextImpl) (this.ownerNode)
View Full Code Here

        // if we already have other text nodes remove them
        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        TextImpl textNode = (TextImpl) (this.ownerNode)
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.