The first implementation doesn't generate the same xml as the second one. You should write the second implementation as follows to match the xml generated by the first one:
public void WriteXml(XmlWriter writer)
{
new XElement("Name", _name).WriteTo(writer);
new XElement("X", _x).WriteTo(writer);
new XElement("Y", _y).WriteTo(writer);
}
Besides, when you call
writer.WriteElementString("X", _x.ToString());
the result could be non XML-compliant and vulnerable to incorrect parsing, depending on _x type (for example, if type of _x is DateTime), so the second implementation is better, at least in this regard.
I got some of this info from C# 5 in a Nutshell.