Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Just added a few parantheses in a code example. The code would not compile without them.

...

Code Block
<foo>
  <foo-bar>test</foo-bar>
</foo> 
  • You do the following:
    Code Block
    
    def foo = new XmlSlurper().parseText(FOO_XML)
    assert "test" == foo."foo-bar".text()
    


You can also parse XML documents using namespaces:

...