Example usage for org.dom4j.tree DefaultProcessingInstruction DefaultProcessingInstruction

List of usage examples for org.dom4j.tree DefaultProcessingInstruction DefaultProcessingInstruction

Introduction

In this page you can find the example usage for org.dom4j.tree DefaultProcessingInstruction DefaultProcessingInstruction.

Prototype

public DefaultProcessingInstruction(String target, String values) 

Source Link

Document

This will create a new PI with the given target and values

Usage

From source file:net.sf.saxon.option.dom4j.DOM4JWriter.java

License:Mozilla Public License

/**
* Handle a processing instruction.//from w  w w. j  a  v a  2s.  com
*/

public void processingInstruction(String target, CharSequence data, int locationId, int properties)
        throws XPathException {
    flush();
    ProcessingInstruction pi = new DefaultProcessingInstruction(target, data.toString());
    ((Element) ancestors.peek()).add(pi);
}