Search code examples
groovy

Where to find Groovy documentation on "queries"?


I am trying to learn more about groovy. Specifically my use case is to read an html document and parse out info and maybe add some data to the html. I found this post on a similar subject: groovy parse local html file but I don't understand some of the syntax and functions used.

For example, in this response I don't really understand what the ".with" does and the ".'**'".

So I'm hoping someone can point me to some documentation or additional info on these kind of expressions and functions. I generally understand this use case but I want to have a better understanding so I can adapt it to my needs.

Thanks for any help or guidance.


Solution

  • with is described here in the documentation https://groovy-lang.org/style-guide.html#_using_code_with_code_and_code_tap_code_for_repeated_operations_on_the_same_bean

    And ** is described here in the documentation (it means depth first traversal): https://groovy-lang.org/processing-xml.html#_flexible_navigation_with_children_depthfirst_and_breadthfirst