protected void setAttribute(XmlElement xml, string name, string value) { if (!string.IsNullOrEmpty(value)) xml.SetAttribute(name, value); }