public void processingInstruction(String target,String data) throws org.xml.sax.SAXException {
  if (m_inEntityRef)   return;
  flushPending();
  if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING)) {
    startNonEscaping();
  }
 else   if (target.equals(Result.PI_ENABLE_OUTPUT_ESCAPING)) {
    endNonEscaping();
  }
 else {
    try {
      if (m_elemContext.m_startTagOpen) {
        closeStartTag();
        m_elemContext.m_startTagOpen=false;
      }
 else       if (m_needToCallStartDocument)       startDocumentInternal();
      if (shouldIndent())       indent();
      final java.io.Writer writer=m_writer;
      writer.write("<?");
      writer.write(target);
      if (data.length() > 0 && !Character.isSpaceChar(data.charAt(0)))       writer.write(' ');
      int indexOfQLT=data.indexOf("?>");
      if (indexOfQLT >= 0) {
        if (indexOfQLT > 0) {
          writer.write(data.substring(0,indexOfQLT));
        }
        writer.write("? >");
        if ((indexOfQLT + 2) < data.length()) {
          writer.write(data.substring(indexOfQLT + 2));
        }
      }
 else {
        writer.write(data);
      }
      writer.write('?');
      writer.write('>');
      m_startNewLine=true;
    }
 catch (    IOException e) {
      throw new SAXException(e);
    }
  }
  if (m_tracer != null)   super.fireEscapingEvent(target,data);
}

public void processingInstruction ( String target , String data ) throws org . xml . sax . SAXException { if ( m_inEntityRef ) return ; flushPending ( ) ; if ( target . equals ( Result . PI_DISABLE_OUTPUT_ESCAPING ) ) { startNonEscaping ( ) ; } else if ( target . equals ( Result . PI_ENABLE_OUTPUT_ESCAPING ) ) { endNonEscaping ( ) ; } else { try { if ( m_elemContext . m_startTagOpen ) { closeStartTag ( ) ; m_elemContext . m_startTagOpen = false ; } else if ( m_needToCallStartDocument ) startDocumentInternal ( ) ; if ( shouldIndent ( ) ) indent ( ) ; final java . io . Writer writer = m_writer ; writer . write ( "<?" ) ; writer . write ( target ) ; if ( data . length ( ) > 0 && ! Character . isSpaceChar ( data . charAt ( 0 ) ) ) writer . write ( ' ' ) ; int indexOfQLT = data . indexOf ( "?>" ) ; if ( indexOfQLT >= 0 ) { if ( indexOfQLT > 0 ) { writer . write ( data . substring ( 0 , indexOfQLT ) ) ; } writer . write ( "? >" ) ; if ( ( indexOfQLT + 2 ) < data . length ( ) ) { writer . write ( data . substring ( indexOfQLT + 2 ) ) ; } } else { writer . write ( data ) ; } writer . write ( '?' ) ; writer . write ( '>' ) ; m_startNewLine = true ; } catch ( IOException e ) { throw new SAXException ( e ) ; } } if ( m_tracer != null ) super . fireEscapingEvent ( target , data ) ; }
receive notification of a processing instruction .
