Add xml declaration
The final step is to add the xml declaration
We will employ the same tactic as with the root element - in the action for the Title token we will invoke a method to print the xml declaration; however, it will output the declaration only the first time it is invoked.