Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMProcessingInstruction


        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;
        factory.createOMText(dest, text.getText(), OMNode.SPACE_NODE);
      } else if (node.getType() == OMNode.ENTITY_REFERENCE_NODE) {
        OMText text = (OMText) node;
View Full Code Here


                        char[] ch = ((OMComment)node).getValue().toCharArray();
                        lexicalHandler.comment(ch, 0, ch.length);
                    }
                    break;
                case OMNode.PI_NODE:
                    OMProcessingInstruction pi = (OMProcessingInstruction)node;
                    contentHandler.processingInstruction(pi.getTarget(), pi.getValue());
                    break;
                case OMNode.ENTITY_REFERENCE_NODE:
                    contentHandler.skippedEntity(((OMEntityReference)node).getName());
                    break;
                default:
View Full Code Here

                }
                return newText;
            }

            case (OMNode.PI_NODE): {
                OMProcessingInstruction importedPI = (OMProcessingInstruction) child;
                OMProcessingInstruction newPI =
                        createOMProcessingInstruction(null, importedPI.getTarget(),
                                                       importedPI.getValue());
                return newPI;
            }
            case (OMNode.COMMENT_NODE): {
View Full Code Here

                }
                return newText;
            }

            case (OMNode.PI_NODE): {
                OMProcessingInstruction importedPI = (OMProcessingInstruction) child;
                OMProcessingInstruction newPI = this.factory
                        .createOMProcessingInstruction(this,
                                                       importedPI.getTarget(),
                                                       importedPI.getValue());
                return newPI;
            }
View Full Code Here

                return false;
            }
        });
        OMNode child = element.getFirstOMChild();
        assertTrue(child instanceof OMProcessingInstruction);
        OMProcessingInstruction pi = (OMProcessingInstruction)child;
        assertEquals("target", pi.getTarget());
        assertEquals("data", pi.getValue());
    }
View Full Code Here

                }
                return newText;
            }

            case (OMNode.PI_NODE): {
                OMProcessingInstruction importedPI = (OMProcessingInstruction) child;
                return createOMProcessingInstruction(null,
                                                                  importedPI.getTarget(),
                                                                  importedPI.getValue());
            }
            case (OMNode.COMMENT_NODE): {
                OMComment importedComment = (OMComment) child;
                return createOMComment(null, importedComment.getValue());
            }
View Full Code Here

                return false;
            }
        });
        OMNode child = element.getFirstOMChild();
        assertTrue(child instanceof OMProcessingInstruction);
        OMProcessingInstruction pi = (OMProcessingInstruction)child;
        assertEquals("target", pi.getTarget());
        assertEquals("", pi.getValue());
    }
View Full Code Here

        case OMNode.ELEMENT_NODE:
          Element el = (Element) node;
          omdoc.addChild((OMNode) el.clone());
          break;
        case OMNode.PI_NODE:
          OMProcessingInstruction pi = (OMProcessingInstruction) node;
          factory.createOMProcessingInstruction(omdoc, pi.getTarget(), pi.getValue());
          break;
      }
    }
    return doc;
  }
View Full Code Here

  public Factory getFactory() {
    return (Factory) this.factory;
  }

  public void addProcessingInstruction(String target, String value) {
    OMProcessingInstruction pi =
      this.factory.createOMProcessingInstruction(
        null, target, value);
    if (this.getOMDocumentElement() != null) {
      this.getOMDocumentElement().insertSiblingBefore(pi);
    } else {
View Full Code Here

        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;
        factory.createOMText(dest, text.getText(), OMNode.SPACE_NODE);
      } else if (node.getType() == OMNode.ENTITY_REFERENCE_NODE) {
        OMText text = (OMText) node;
View Full Code Here

TOP

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

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.