Questions tagged [gpath]

Path expression language integrated into Groovy which allows parts of nested structured data to be identified. Can be used to query XML and nested Plain Old Java Objects

An overview of GPath with some sample code can be found on the codehause.org site

http://groovy.codehaus.org/GPath

79 questions
0
votes
1 answer

Groovy "find" closure...Traversing through recursive xml

If i have my GPath like this: 5 10 To get a Mango which has an id of 5, i would do, GPathResult result = Apple.find{ it.Mango.id=5 } But If my…
user1717230
  • 443
  • 1
  • 15
  • 30
0
votes
1 answer

How to write conditional expression using Gpath in GSP page

I want to display the attachments whose type may be 1 or 4 or 5 ${attachments} has got attachments with the attributes name, type EDIT:

File: ${it.name},…

n92
  • 7,424
  • 27
  • 93
  • 129
0
votes
1 answer

Selecting using XmlSlurper like a WHERE clause

Given the following HTML snippet, I need to extract the text of the content attribute for the meta tag with attribute name equal to description and the meta tag with attribute property equal to og:title. I've tried what is shown at Groovy: Correct…
Lee Grey
  • 303
  • 1
  • 5
  • 16
0
votes
1 answer

Gpath doing predicates with comparison expressions

Using Groovy 2.0 Is it possible with the GPath property expressions to uses predicate to filter: class HandShaker { String title } class AussieGreeter implements Greeter { String name List handshaker .... } AussieGreeter greeter =…
Matthew Campbell
  • 1,864
  • 3
  • 24
  • 51
1 2 3 4 5
6