Returns the actual XML form of this processing instruction, such as might be copied and pasted from the original document.
String
7677787980818283848586
public Nodes makeProcessingInstruction( String target, String data) { ProcessingInstruction pi = new ProcessingInstruction(target, data); System.out.println(pi.toXML()); return empty; } public static void main(String[] args) {
182183184185186187188189190191192
ProcessingInstruction instruction1 = new ProcessingInstruction("target", "data"); ProcessingInstruction instruction2 = new ProcessingInstruction(instruction1); assertEquals(instruction1.getTarget(), instruction2.getTarget()); assertEquals(instruction1.getValue(), instruction2.getValue()); assertEquals(instruction1.toXML(), instruction2.toXML()); } public void testSetValue() {
378379380381382383384385386387388
} public void testAllowReservedCharactersInData() { ProcessingInstruction pi = new ProcessingInstruction("target", "<test>&&greater;"); String xml = pi.toXML(); assertEquals("<?target <test>&&greater;?>", xml); } // This can't be round-tripped