【问题标题】:Google Web Toolkit (GWT) + XPath谷歌网络工具包 (GWT) + XPath
【发布时间】:2011-05-13 04:10:17
【问题描述】:

我需要在 GWT 中评估 XPath 查询。 我没有服务器端,所以我必须在我的 GWT 客户端应用程序中评估它们。

哪个是 GWT 的最佳 XPath 库?

【问题讨论】:

    标签: xml gwt xpath


    【解决方案1】:

    不知道它是否是最好的,或者它是否是你要找的,但快速搜索一下:http://dev.abiss.gr/sarissa/

    【讨论】:

    • 谢谢,但 Sarissa 是 ECMAScript,我正在寻找 GWT 库。
    【解决方案2】:

    我找到了 totoe (http://code.google.com/p/totoe/),这是一个基于 Sarissa 的 GWT 库(谢谢 Diogo!)。它就像一个魅力!

    例如:

    String xml = "...";
    Document document = new XmlParser().parse(xml, "xmlns:acme=\"http://www.acme.org\"");
    Element root = document.getRoot();
    List<Comment> comments = document.findByType(NodeType.COMMENT);
    List<Node> products = document.selectNodes("//acme:products");
    

    【讨论】:

      猜你喜欢
      • 2011-03-11
      • 2011-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-20
      相关资源
      最近更新 更多