private void WriteField(XmlElement n, GffComponent c) { var fld = (GffField)c; n.SetAttribute(AType, Enum.GetName(typeof(GffType), fld.Type)); var data = fld.Value; if (data != string.Empty) { n.AppendChild(Xdoc.CreateTextNode(data)); } }