Here is my XML,
XML
If node name is deprecated and must not be used in the whole document, just use ReplaceWith:
var xNode = doc.Descendants("x"); for (int i = 0; i < xNode.Count; i++) { xNode[i].ReplaceWith(xNode[i].Nodes()); }