Examples of OMProcessingInstruction


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

Examples of org.apache.axiom.om.OMProcessingInstruction

                        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

Examples of org.apache.axiom.om.OMProcessingInstruction

                }
                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

Examples of org.apache.axiom.om.OMProcessingInstruction

                }
                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

Examples of org.apache.axiom.om.OMProcessingInstruction

                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

Examples of org.apache.axiom.om.OMProcessingInstruction

                }
                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

Examples of org.apache.axiom.om.OMProcessingInstruction

                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

Examples of org.apache.axiom.om.OMProcessingInstruction

        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

Examples of org.apache.axiom.om.OMProcessingInstruction

  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

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
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.