in reply to Difficulties defining a grammar for Parse::RecDescent

To make the Element regexp non-greedy, use:
Element: /[^<\/\n]+?/
So that it picks up everything until it encounters a newline, slash or <, instead of up to the last one of these. (It will be a problem if an element can contain a < or slash though.)
And I think your <error> text should be in quotes.

C.