import org.xml.sax.helpers.XMLFilterImpl; public class ProcessingInstructionStripper extends XMLFilterImpl { public void processingInstruction(String target, String data) { // Because we do nothing, processing instructions read in the // document are *not* passed to client application } }