Skip to content

Instantly share code, notes, and snippets.

@jurberg
Created November 11, 2012 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jurberg/4056280 to your computer and use it in GitHub Desktop.
Save jurberg/4056280 to your computer and use it in GitHub Desktop.
Convert XML to Flat File Mapping
def mapping = [[closure: { book.@id.text() }, length: 5],
[closure: { book.author.text().split(',')[0] }, length: 15],
[closure: { book.author.text().split(',')[1] }, length: 10]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment