Example #1
0
  /**
   * This will indicate that a processing instruction has been encountered. (The XML declaration is
   * not a processing instruction and will not be reported.)
   *
   * @param target <code>String</code> target of PI
   * @param data <code>String</code> containing all data sent to the PI. This typically looks like
   *     one or more attribute value pairs.
   * @throws SAXException when things go wrong
   */
  public void processingInstruction(String target, String data) throws SAXException {

    if (suppress) return;

    flushCharacters();

    if (atRoot) {
      factory.addContent(document, factory.processingInstruction(target, data));
    } else {
      factory.addContent(getCurrentElement(), factory.processingInstruction(target, data));
    }
  }