The problem is that you're trying to build the XML file using the XNA's Content Pipeline. However, in the source code you posted, the XML file is being loaded at runtime using the LINQ to XML API (XDocument) so it shouldn't be passingdoesn't need to go through the the XNA's Content Pipelinecontent pipeline.
To solve this, do the following - onproblem, go to the Solution Explorer, browse into your Content project to your XML file, and then on its Properties, change the Build Action property from Compile to Content, and also enable the Copy to Output Directory property. See picture below:
This way your XML file will still be copied to the Content folder, without being built by the XNA's Content Pipeline.