Package org.apache.abdera.parser.stax

Examples of org.apache.abdera.parser.stax.FOMXPath.selectNodes()


    FOMXPath fxpath = (FOMXPath) xpath;
    Map<QName,Function> functions = fxpath.getDefaultFunctions();
    functions.put(AlternateLinkFunction.QNAME, new AlternateLinkFunction());
    fxpath.setDefaultFunctions(functions);
    List<Link> links =
      fxpath.selectNodes(
        "abdera:altlinks(/a:feed/a:entry)",
        feed);
    System.out.println(links);
  }
 
View Full Code Here


        // You can add your own xpath functions.
        FOMXPath fxpath = (FOMXPath)xpath;
        Map<QName, Function> functions = fxpath.getDefaultFunctions();
        functions.put(AlternateLinkFunction.QNAME, new AlternateLinkFunction());
        fxpath.setDefaultFunctions(functions);
        List<Link> links = fxpath.selectNodes("abdera:altlinks(/a:feed/a:entry)", feed);
        System.out.println(links);
    }

    public static class AlternateLinkFunction implements Function {
View Full Code Here

    FOMXPath fxpath = (FOMXPath) xpath;
    Map<QName,Function> functions = fxpath.getDefaultFunctions();
    functions.put(AlternateLinkFunction.QNAME, new AlternateLinkFunction());
    fxpath.setDefaultFunctions(functions);
    List<Link> links =
      fxpath.selectNodes(
        "abdera:altlinks(/a:feed/a:entry)",
        feed);
    System.out.println(links);
  }
 
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.