Examples of xpath()


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

            RadialGradientFill fill = new RadialGradientFill()
                    .setCenterX(Double.parseDouble(egrad.attr("centerX")))
                    .setCenterY(Double.parseDouble(egrad.attr("centerY")))
                    .setRadius(Double.parseDouble(egrad.attr("radius")))
                    ;
            for(Elem stop : egrad.xpath("stop")) {
                fill.addStop(
                        Double.parseDouble(stop.attr("position")),
                        new FlatColor(stop.attr("color"))
                        );
            }
View Full Code Here

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

        SketchDocument.SketchPage page = sdoc.addPage();
        u.p("parsing");
        Doc doc = XMLParser.parse(stream);
        u.p("parsed");
        Elem svg = doc.xpathElement("/svg");
        for(Elem n : svg.xpath("./*")) {
            u.p("node = " + n + " " + n.name());
            SNode node = loadNode(n);
            if(node != null) page.add(node);
        }
        return sdoc;
View Full Code Here

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

        try {
            Doc doc = XMLParser.parse(file);
            Elem e = doc.xpathElement("/example");
            Example ex = new Example();
            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();
View Full Code Here

Examples of net.sf.toxicity.XPathRef.xpath()

            } catch (IllegalAccessException e) {
                log.error(e.getMessage(), e);
                ret = false;
            }
           
            String expr = bind.xpath();
            String cond = bind.condition();
            boolean optional = bind.optional();
           
            try {
                // make ns available
View Full Code Here

Examples of org.apache.camel.builder.xml.NamespaceBuilder.xpath()

                // START SNIPPET: example
                // lets define the namespaces we'll need in our filters
                NamespaceBuilder ns = namespaceContext("c", "http://acme.com/cheese")
                    .namespace("xsd", "http://www.w3.org/2001/XMLSchema");

                from("direct:start").filter(ns.xpath("/c:person[@name='James']")).to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.NamespaceBuilder.xpath()

                // lets define the namespaces we'll need in our filters
                NamespaceBuilder ns = namespaceContext("c", "http://acme.com/cheese")
                            .namespace("xsd", "http://www.w3.org/2001/XMLSchema");

                from("direct:start").filter(
                        ns.xpath("/c:person[@name='James']")
                ).to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces.xpath()

                Namespaces ns = new Namespaces("c", "http://acme.com/cheese")
                        .add("xsd", "http://www.w3.org/2001/XMLSchema");

                // now lets create an xpath based Message Filter
                from("direct:start").
                        filter(ns.xpath("/c:person[@name='James']")).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces.xpath()

                // START SNIPPET: example
                Namespaces ns = new Namespaces("foo", "urn:cheese");

                from("direct:start").
                        unmarshal().string().
                        setHeader("foo", ns.xpath("/foo:person[@name='James']")).
                        filter(ns.xpath("/foo:person[@name='James']")).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces.xpath()

                Namespaces ns = new Namespaces("foo", "urn:cheese");

                from("direct:start").
                        unmarshal().string().
                        setHeader("foo", ns.xpath("/foo:person[@name='James']")).
                        filter(ns.xpath("/foo:person[@name='James']")).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.builder.xml.Namespaces.xpath()

                Namespaces ns = new Namespaces("c", "http://acme.com/cheese")
                        .add("xsd", "http://www.w3.org/2001/XMLSchema");

                // now lets create an xpath based Message Filter
                from("direct:start").
                        filter(ns.xpath("/c:person[@name='James']")).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
    }
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.