public static string getAttributeValue(XmlAttribute attribute) { if (attribute.Equals("")) return ""; if (attribute.ChildNodes.Count != 1) return ""; XmlNode valueNode = attribute.ChildNodes[0]; string valueName = valueNode.Value; if (valueName == null || valueName.Equals("")) return ""; return valueName; }