private Category GetTaxonomyByName(string taxonomyName) { Publication p = this.GetPublication(); XmlElement list = p.GetListCategories(); foreach (XmlElement item in list.SelectNodes("/*/*")) { if (item.GetAttribute("Title").Equals(taxonomyName)) { return((Category)Engine.GetObject(item.GetAttribute("ID"))); } } throw new InvalidDataException(string.Format("Category {0} does not exist", taxonomyName)); }