Example usage for javax.xml.stream.events XMLEvent isProcessingInstruction

List of usage examples for javax.xml.stream.events XMLEvent isProcessingInstruction

Introduction

In this page you can find the example usage for javax.xml.stream.events XMLEvent isProcessingInstruction.

Prototype

public boolean isProcessingInstruction();

Source Link

Document

A utility function to check if this event is a ProcessingInstruction.

Usage

From source file:org.callimachusproject.rdfa.test.RDFaGenerationTest.java

void testPI(XMLEventReader xml) throws Exception {
    while (xml.hasNext()) {
        XMLEvent e = xml.nextEvent();
        if (e.isProcessingInstruction()) {
            if (e.toString().contains("repository clear") || e.toString().contains("clear repository")) {
                source.clear();// w  w w . j  a v a  2 s  . c  o m
            }
        }
    }
}