public static List <string> GetValuesStringList(XmlNode parentNode, string groupElementName) { List <string> retVal = new List <string>(); List <string> xmlStrList = GetListXmlObjects(parentNode, groupElementName); foreach (string xmlSource in xmlStrList) { retVal.Add(Xml_Helper.GetValueStr(xmlSource)); } return(retVal); }
/// <summary> /// Возвращает список xml сериализованных объектов из указанного "кустового" элемента /// </summary> /// <param name="parentNode"></param> /// <param name="elementName"></param> /// <returns></returns> public static List <string> GetListXmlObjects(XmlNode parentNode, string groupElementName) { int count = Xml_Helper.GetCount(parentNode, groupElementName); XmlElement listElement = Xml_Helper.FindElement(parentNode, groupElementName); if (count > 0 && listElement != null) { return(Xml_Helper.GetAllObjectsAsXmlStrings(listElement)); } else { return(new List <string>()); } }