I have noticed that if I use an ampersand in the Page name, even though the page title and the actual page filename are fine, I get an XML parsing error because it is not properly encoded as & in the navigation label field. It would be nice of the system caught this prior to publishing.
You can solve this by replacing $Title with $Title.XML in your template.
Andy: Thanks! Are there any other side effects or gotchas by doing this? If not, why is this not default?
Hmm, I thought $Title was supposed to render the raw text as XML safe text anyway? Perhaps this needs to be fixed?
Just to be clear, my issue is not with the Title or Page Name fields, but with the Navigation Label field. It is the unescaped ampersand in the nav unordered list that is causing the XML error.
I have fixed it in my site by escaping it; however, it seems that the field should be made XML safe text by default.