For example:
def list = {
books = Book.findAll(...)
render(contentType: 'text/xml') {
books(count: books.size()) {
for(book in books) {
book(id: book.id) {
title(book.title)
}
}
}
}
}
Using books and book as nodes cause naming conflicts. I understand I can rename everything to prevent the issue but is there a way to escape the nodes to prevent the issue and keep a clean naming convention?
Quote the conflicting node-generating terms:
or use a different local variable name.