BExIS.Xml.Models.Mapping.Destination.Convert C# (CSharp) Method

Convert() public static method

public static Convert ( XmlNode xmlNode ) : Destination
xmlNode System.Xml.XmlNode
return Destination
        public static Destination Convert(XmlNode xmlNode)
        {
            string xPath = "";
            string sequenceName = "";
            string prefix = "";
            string namespaceUri = "";
            if (xmlNode.Attributes.Count > 0)
            {
                xPath = xmlNode.Attributes[XmlMapperAttributes.xPath.ToString()].Value;

                if (xmlNode.Attributes[XmlMapperAttributes.sequence.ToString()] != null)
                {
                    sequenceName = xmlNode.Attributes[XmlMapperAttributes.sequence.ToString()].Value;
                }

                if (xmlNode.Attributes[XmlMapperAttributes.prefix.ToString()] != null)
                {
                    prefix = xmlNode.Attributes[XmlMapperAttributes.prefix.ToString()].Value;
                }

                if (xmlNode.Attributes[XmlMapperAttributes.namespaceUri.ToString()] != null)
                {
                    namespaceUri = xmlNode.Attributes[XmlMapperAttributes.namespaceUri.ToString()].Value;
                }

            }

            return new Destination(xPath, sequenceName, prefix, namespaceUri);
        }