Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMComment


                                                       importedPI.getTarget(),
                                                       importedPI.getValue());
                return newPI;
            }
            case (OMNode.COMMENT_NODE): {
                OMComment importedComment = (OMComment) child;
                OMComment newComment = this.factory.createOMComment(this,
                                                                    importedComment.getValue());
                DocumentImpl doc;
                if (this instanceof DocumentImpl) {
                    doc = (DocumentImpl) this;
                } else {
View Full Code Here


        factory.createOMText(dest,text.getText(), OMNode.CDATA_SECTION_NODE);
      } else if (node.getType() == OMNode.TEXT_NODE) {
        OMText text = (OMText) node;
        factory.createOMText(dest,text.getText());
      } else if (node.getType() == OMNode.COMMENT_NODE) {
        OMComment comment = (OMComment) node;
        factory.createOMComment(dest, comment.getValue());
      } else if (node.getType() == OMNode.PI_NODE) {
        OMProcessingInstruction pi = (OMProcessingInstruction) node;
        factory.createOMProcessingInstruction(dest, pi.getTarget(), pi.getValue());
      } else if (node.getType() == OMNode.SPACE_NODE) {
        OMText text = (OMText) node;
View Full Code Here

    OMDocument omdoc = (OMDocument) doc;
    for (Iterator i = getChildren(); i.hasNext();) {
      OMNode node = (OMNode) i.next();
      switch(node.getType()) {
        case OMNode.COMMENT_NODE:
          OMComment comment = (OMComment) node;
          factory.createOMComment(omdoc, comment.getValue());
          break;
        case OMNode.DTD_NODE:
          OMDocType doctype = (OMDocType) node;
          factory.createOMDocType(omdoc, doctype.getValue());
          break;
View Full Code Here

        OMDocument omdoc = (OMDocument)doc;
        for (Iterator i = getChildren(); i.hasNext();) {
            OMNode node = (OMNode)i.next();
            switch (node.getType()) {
                case OMNode.COMMENT_NODE:
                    OMComment comment = (OMComment)node;
                    factory.createOMComment(omdoc, comment.getValue());
                    break;
                case OMNode.DTD_NODE:
                    OMDocType doctype = (OMDocType)node;
                    factory.createOMDocType(omdoc, doctype.getValue());
                    break;
View Full Code Here

        }
        return this;
    }

    public <X extends Base> X addComment(String value) {
        OMComment comment = this.factory.createOMComment(null, value);
        if (this.getOMDocumentElement() != null) {
            this.getOMDocumentElement().insertSiblingBefore(comment);
        } else {
            this.addChild(comment);
        }
View Full Code Here

                return factory.createOMProcessingInstruction(null,
                                                                  importedPI.getTarget(),
                                                                  importedPI.getValue());
            }
            case (OMNode.COMMENT_NODE): {
                OMComment importedComment = (OMComment) child;
                return factory.createOMComment(null, importedComment.getValue());
            }
            case (OMNode.DTD_NODE) : {
                OMDocType importedDocType = (OMDocType) child;
                return factory.createOMDocType(null, importedDocType.getValue());
            }
View Full Code Here

                                                       importedPI.getTarget(),
                                                       importedPI.getValue());
                return newPI;
            }
            case (OMNode.COMMENT_NODE): {
                OMComment importedComment = (OMComment) child;
                OMComment newComment = this.factory.createOMComment(this,
                                                                    importedComment.getValue());
                DocumentImpl doc;
                if (this instanceof DocumentImpl) {
                    doc = (DocumentImpl) this;
                } else {
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.OMComment

Copyright © 2018 www.massapicom. 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.