private static IFieldPlaceholder GetItem_FromXmlNode(XmlNode validationNode)
        {
            if (validationNode.Name != "placeholderItem")
            {
                return(null);
            }

            string fullNameSpace = validationNode.Attributes["type"].Value;

            //check to verify that xml was not malformed
            if (string.IsNullOrEmpty(fullNameSpace))
            {
                return(null);
            }

            //verify we can break up the type string into a namespace and assembly name
            string[] split = fullNameSpace.Split(',');
            if (split.Length == 0)
            {
                return(null);
            }

            string nameSpace    = split[0];
            string assemblyName = split[1];

            IFieldPlaceholder fieldPlaceholder = GetItem_FromReflection(nameSpace, assemblyName);

            if (fieldPlaceholder == null)
            {
                return(null);
            }

            //set max count
            fieldPlaceholder.Key = null;
            if (validationNode.Attributes["key"] != null && !string.IsNullOrEmpty(validationNode.Attributes["key"].Value))
            {
                if (!string.IsNullOrEmpty(validationNode.Attributes["key"].Value))
                {
                    fieldPlaceholder.Key = validationNode.Attributes["key"].Value;
                }
            }

            return(fieldPlaceholder);
        }
        /// <summary>
        /// Uses reflection to instantiate the IFieldPlaceholder class
        /// </summary>
        /// <param name="nameSpace"></param>
        /// <param name="assemblyName"></param>
        /// <returns></returns>
        private static IFieldPlaceholder GetItem_FromReflection(string nameSpace, string assemblyName)
        {
            // load the assemly
            Assembly assembly = GetAssembly(assemblyName);

            // Walk through each type in the assembly looking for our class
            Type type = assembly.GetType(nameSpace);

            if (type == null || !type.IsClass)
            {
                return(null);
            }

            //cast to validator class
            IFieldPlaceholder fieldPlaceholder = (IFieldPlaceholder)Activator.CreateInstance(type);

            if (fieldPlaceholder == null)
            {
                return(null);
            }

            return(fieldPlaceholder);
        }