Examples of OMProcessingInstruction


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

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 String[] getProcessingInstruction(String target) {
        List<String> values = new ArrayList<String>();
        for (Iterator i = getChildren(); i.hasNext();) {
            OMNode node = (OMNode)i.next();
            if (node.getType() == OMNode.PI_NODE) {
                OMProcessingInstruction pi = (OMProcessingInstruction)node;
                if (pi.getTarget().equalsIgnoreCase(target))
                    values.add(pi.getValue());
            }
        }
        return values.toArray(new String[values.size()]);
    }
View Full Code Here

Examples of org.apache.axiom.om.OMProcessingInstruction

        }
        return values.toArray(new String[values.size()]);
    }

    public Document<T> addProcessingInstruction(String target, String value) {
        OMProcessingInstruction pi = this.factory.createOMProcessingInstruction(null, target, value);
        if (this.getOMDocumentElement() != null) {
            this.getOMDocumentElement().insertSiblingBefore(pi);
        } else {
            this.addChild(pi);
        }
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 newText;
            }

            case (OMNode.PI_NODE): {
                OMProcessingInstruction importedPI = (OMProcessingInstruction) child;
                return factory.createOMProcessingInstruction(null,
                                                                  importedPI.getTarget(),
                                                                  importedPI.getValue());
            }
            case (OMNode.COMMENT_NODE): {
                OMComment importedComment = (OMComment) child;
                return factory.createOMComment(null, importedComment.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 String[] getProcessingInstruction(String target) {
    List<String> values = new ArrayList<String>();
    for (Iterator i = getChildren(); i.hasNext();) {
      OMNode node = (OMNode) i.next();
      if (node.getType() == OMNode.PI_NODE) {
        OMProcessingInstruction pi = (OMProcessingInstruction) node;
        if (pi.getTarget().equalsIgnoreCase(target))
          values.add(pi.getValue());
      }
    }
    return values.toArray(new String[values.size()]);
  }
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.