Examples of xpathString()


Examples of com.joshondesign.xml.Doc.xpathString()

        rect2.setFillPaint(FlatColor.GREEN);
        page.add(rect2);
       
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(50.0,50.0)".equals(xdoc.xpathString("/svg/g/@transform")));
        assertTrue("10.0".equals(xdoc.xpathString("/svg/g/rect/@width")));
        assertTrue("1.0".equals(xdoc.xpathString("/svg/g/ellipse/@stroke-width")));
        assertTrue("150.0".equals(xdoc.xpathString("/svg/rect/@width")));
    }

View Full Code Here

Examples of com.joshondesign.xml.Doc.xpathString()

        page.add(rect2);
       
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(50.0,50.0)".equals(xdoc.xpathString("/svg/g/@transform")));
        assertTrue("10.0".equals(xdoc.xpathString("/svg/g/rect/@width")));
        assertTrue("1.0".equals(xdoc.xpathString("/svg/g/ellipse/@stroke-width")));
        assertTrue("150.0".equals(xdoc.xpathString("/svg/rect/@width")));
    }


    @Test public void testArea() throws Exception {
View Full Code Here

Examples of com.joshondesign.xml.Doc.xpathString()

       
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(50.0,50.0)".equals(xdoc.xpathString("/svg/g/@transform")));
        assertTrue("10.0".equals(xdoc.xpathString("/svg/g/rect/@width")));
        assertTrue("1.0".equals(xdoc.xpathString("/svg/g/ellipse/@stroke-width")));
        assertTrue("150.0".equals(xdoc.xpathString("/svg/rect/@width")));
    }


    @Test public void testArea() throws Exception {
        SRect rect = new SRect(0,0,10,10);
View Full Code Here

Examples of com.joshondesign.xml.Doc.xpathString()

        sarea.setTranslateY(10);
        sarea.setFillPaint(FlatColor.GREEN);
        page.clear();
        page.add(sarea);
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(10.0,10.0)".equals(xdoc.xpathString("/svg/path/@transform")));
    }

    @Test public void testArrow() {

    }
View Full Code Here

Examples of com.joshondesign.xml.Doc.xpathString()

        if(file != null) {
            doc.setBaseURI(file.toURI());
        }
        SketchDocument sdoc = new SketchDocument();
        sdoc.removePage(sdoc.getCurrentPage());
        int version = Integer.parseInt(doc.xpathString("/sketchy/@version"));

        Log.info("version = ",version);
        if(version < NativeExport.CURRENT_VERSION) {
            doc = upgradeDocument(doc);
        }
View Full Code Here

Examples of com.joshondesign.xml.Doc.xpathString()

        loadNumberAttribute(doc.xpathElement("/sketchy/info"),sdoc,"width");
        loadNumberAttribute(doc.xpathElement("/sketchy/info"),sdoc,"height");
        for(Elem e : doc.xpath("/sketchy/page")) {
            loadPage(sdoc,e,zipFile);
        }
        String type = doc.xpathString("/sketchy/info/@type");
        if("presentation".equals(type)) {
            sdoc.setPresentation(true);
        }

        Elem info = doc.xpathElement("/sketchy/info");
View Full Code Here

Examples of com.joshondesign.xml.Elem.xpathString()

            ex.name = e.attr("name");
            for(Elem k : e.xpath("keyword")) {
                ex.keywords.add(k.text().toLowerCase());
                //Util.p("added keyword: " + k.text().toLowerCase());
            }
            ex.description = e.xpathString("description/text()");
            ex.directory = file.getParentFile();
            //Util.p("parsed example: " + ex.name);
            return ex;
        } catch (Exception ex) {
            Logger.getLogger(Global.class.getName()).log(Level.SEVERE, null, ex);
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.