Package nu.xom

Examples of nu.xom.Document.copy()


        }
        long post = System.currentTimeMillis();
        System.out.println((post - pre)/1000.0 + "s to build document by copying");
         
        pre = System.currentTimeMillis();
        doc.copy();
        post = System.currentTimeMillis();
        System.out.println((post - pre)/1000.0 + "s to copy entire Document");
         
        System.gc(); System.gc(); System.gc();
View Full Code Here


   
    public void testEmptyElementAsRootElementCopy() {
       
        Element root = new Element("root");
        Document doc = new Document(root);
        Node copy = doc.copy();
        assertEquals(doc, copy);
    }
   
   
    public void testCopy() {
View Full Code Here

      } else {
        ScrapBook sb = new ScrapBook(f);
        Document doc = (Document)sb.getDoc().copy();
        Nodes nodes = doc.query("//cmlPile");
        for(int i=0;i<nodes.size();i++) nodes.get(i).detach();
        state.sourceDoc = (Document)doc.copy();
        nodes = state.sourceDoc.query("//ne");
        for(int i=0;i<nodes.size();i++) {
          XOMTools.removeElementPreservingText((Element)nodes.get(i));
        }
        state.safDoc = InlineToSAF.extractSAFs(doc, state.sourceDoc, "foo");
View Full Code Here

   
    public void testEmptyElementAsRootElementCopy() {
       
        Element root = new Element("root");
        Document doc = new Document(root);
        Node copy = doc.copy();
        assertEquals(doc, copy);
    }
   
   
    public void testCopy() {
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.