Examples of XPathRequest


Examples of org.polyglotted.xpathstax.model.XPathRequest

    public NodeConverter(String requestStr) {
        @SuppressWarnings("unchecked")
        Class<T> tClass = (Class<T>) getParametricClass(getClass());
        this.context = new XmlBinderContext<T>(tClass);
        this.request = new XPathRequest(requestStr);
    }
View Full Code Here

Examples of org.polyglotted.xpathstax.model.XPathRequest

public class XPathStaxParserTest {

    @Test
    public void testParse() {
        XPathStaxParser parser = new XPathStaxParser();
        parser.addHandler(new XPathRequest("/catalog/book[@id='bk101']/price"), new NodeHandler() {
            @Override
            public void processNode(XmlNode xmlNode) {
                Value count = xmlNode.getText();
                assertEquals(44.95, count.asDouble(), 0.001);            }
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.