Package org.apache.axiom.om.xpath

Examples of org.apache.axiom.om.xpath.AXIOMXPath.selectSingleNode()


     */
    public static String parseStandardQuoteResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:last");
        xPath.addNamespace("ns","http://services.samples/xsd");
        OMElement last = (OMElement) xPath.selectSingleNode(result);
        if (last != null) {
            return last.getText();
        } else {
            throw new Exception("Unexpected response : " + result);
        }
View Full Code Here


     */
    public static String parseCustomQuoteResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:Price");
        xPath.addNamespace("ns","http://services.samples/xsd");
        OMElement price = (OMElement) xPath.selectSingleNode(result);       
        if (price != null) {
            return price.getText();
        } else {
            throw new Exception("Unexpected response : " + result);
        }
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.