Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Web Toolkit (GWT) + XPath

Tags:

xml

xpath

gwt

I need to evaluate XPath query in GWT. I haven't a server-side so I have to evaluate them in my GWT client-side application.

Which is the best XPath library for GWT?

like image 726
Federico Avatar asked Nov 20 '10 18:11

Federico


People also ask

Is GWT still alive?

GWT is not dead! It's simply suffering from PR misunderstanding. People think that you have to use the old widget system to use GWT, but you don't. Just use Elemento instead of widgets and REST calls instead of RPC.

Is GWT supported?

Officially, support is dropped for running the GWT compiler or server-side tooling on Java 7. The GWT distribution is still compiled to run on Java 7 for this release, but no guarantees are made about whether or not this will work. Future versions will compile bytecode for Java 8+.

What is GWT used for?

Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications easy. With GWT, you can develop and debug AJAX applications in the Java language using the Java development tools of your choice.

How old is GWT?

History. GWT version 1.0 RC 1 was released on May 16, 2006. Google announced GWT at the JavaOne conference in 2006. In August 2010, Google acquired Instantiations, a company known for focusing on Eclipse Java developer tools, including GWT Designer, which is now bundled with Google Plugin for Eclipse.


1 Answers

I found totoe (http://code.google.com/p/totoe/), a GWT library based on Sarissa (thank you Diogo!). It works like a charm!

For example:

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");
like image 183
Federico Avatar answered Oct 13 '22 19:10

Federico