Ideally, you should not create Xml document by concatenating strings. The best way to create an xml document is to use XmlWriter. It will ensure that the document you create is a valid Xml document. It will always encode characters if necessary/possible.
Example: