Federico
Federico

Reputation: 91

Google Web Toolkit (GWT) + XPath

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?

Upvotes: 6

Views: 2095

Answers (2)

Federico
Federico

Reputation: 91

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");

Upvotes: 3

Diogo
Diogo

Reputation: 548

dont know if its the best, or if its what you're looking for, but a quick search came up with this : http://dev.abiss.gr/sarissa/

Upvotes: 0

Related Questions