Package nu.xom

Examples of nu.xom.ProcessingInstruction.toXML()


    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) {
 
View Full Code Here


        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() {
View Full Code Here

    }

   
    public void testAllowReservedCharactersInData() {
        ProcessingInstruction pi = new ProcessingInstruction("target", "<test>&amp;&greater;");
        String xml = pi.toXML();
        assertEquals("<?target <test>&amp;&greater;?>", xml)
    }
   
   
    // This can't be round-tripped
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.