Package org.apache.axiom.om

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


    public void setText(String text) {

        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        OMAbstractFactory.getOMFactory().createOMText(this, text);
View Full Code Here


    public void setText(QName text) {

        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        OMAbstractFactory.getOMFactory().createOMText(this, text);
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

                log.debug("Transformation result : " + result);
            }

            // replace the sourceNode with the result.
            sourceNode.insertSiblingAfter(result);
            sourceNode.detach();

        } catch (TransformerException e) {
            handleException("Error performing XSLT transformation " + xsltKey, e);
        } catch (XMLStreamException e) {
            handleException("Error building result from XSLT transformation", e);
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

    public void setText(String text) {

        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        OMAbstractFactory.getOMFactory().createOMText(this, text);
View Full Code Here

    public void setText(QName text) {

        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        OMAbstractFactory.getOMFactory().createOMText(this, text);
View Full Code Here

                    Object o = targetXPath.evaluate(synCtx.getEnvelope());

                    if (o != null && o instanceof OMElement) {
                        OMNode tgtNode = (OMElement) o;
                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
                    } else if (o != null && o instanceof List && !((List) o).isEmpty()) {
                        OMNode tgtNode = (OMElement) ((List) o).get(0)// Always fetches *only* the first
                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
                    } else {
View Full Code Here

                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
                    } else if (o != null && o instanceof List && !((List) o).isEmpty()) {
                        OMNode tgtNode = (OMElement) ((List) o).get(0)// Always fetches *only* the first
                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
                    } else {
                        handleException("Evaluation of target XPath expression : " +
                            targetXPathString + " did not yeild an OMNode", synCtx);
                    }
                } if (targetKey != null) {
View Full Code Here

                        synCtx.getEnvelope().getBody().addChild(child);
                    }

                } else {
                    sourceNode.insertSiblingAfter(result);
                    sourceNode.detach();
                }
            }

        } catch (TransformerException e) {
            handleException("Error performing XSLT transformation using : " + xsltKey, e, synCtx);
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.