Convert() public static method

public static Convert ( XmlNode xmlNode ) : Source
xmlNode System.Xml.XmlNode
return Source
Example #1
0
        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);
        }