probably you will get below error
Error:
The ' ' character, hexadecimal value 0x20, cannot be included in a name.
Solution:
XElement/attribute does not contain space between node name, make sure your node name doesn't have white spaces.
for example
<Row Total Cost="" />
change to
<Row TotalCost="" />
if you notice second one there is no white space on Attribute TotalCost
hope this helps