public static XmlMappingRoute Convert(XmlNode xmlNode) { XmlMappingRoute route = new XmlMappingRoute(); if (xmlNode.Name.Equals(XmlMapperTags.route.ToString())) { foreach (XmlNode childNode in xmlNode.ChildNodes) { if (childNode.Name.Equals(XmlMapperTags.destination.ToString())) { route.Destination = Destination.Convert(childNode); } if (childNode.Name.Equals(XmlMapperTags.source.ToString())) { route.Source = Source.Convert(childNode); } } return(route); } return(null); }