How To Use x name in Linq-to-xml?
There is a static method on XName called Get that allows you to create an XName. However, there is also an implicit cast from string to XName, so if you just enter a string, it should be able to convert to XName and work without problems