stephansun对《Groovy Recipes》的笔记(1)

stephansun
stephansun (认真你就输了...)

读过 Groovy Recipes

Groovy Recipes
  • 书名: Groovy Recipes
  • 作者: Scott Davis
  • 副标题: Greasing the Wheels of Java (Pragmatic Programmers)
  • 页数: 249
  • 出版社: Pragmatic Bookshelf
  • 出版年: 2008-03-11
  • 第131页
    Whereas XmlParser treats everything like a node or a list of nodes, Xml- Slurper treats everything like the result of a GPath query. This makes it more natural to navigate the path. When you ask for person.address.city, you are implicitly asking for the text in that element. Stated another way, XmlParser has a strong affinity for branches. XmlSlurper is exactly the opposite: it is optimized for leaves.
    引自第131页
    2013-08-21 09:17:02 回应