private void ProcessMapping(XmlElement xmlElement, AN_SemanticsMember member)
 {
     if (xmlElement.HasAttribute("columnName"))
         member.ColumnFormula = xmlElement.Attributes["columnName"].Value;
     if (xmlElement.HasAttribute("schemaName"))
         member.MappingSchema = xmlElement.Attributes["schemaName"].Value;
     if (xmlElement.HasAttribute("columnObjectName"))
         member.MappingObject = xmlElement.Attributes["columnObjectName"].Value;
 }
        private void ProcessNode(XmlElement xmlParent, Enums.MemberType memberType)
        {
            foreach (XmlElement xmlElement in xmlParent)
            {
                AN_SemanticsMember member = new AN_SemanticsMember();
                member.ViewName = viewName;
                member.Id = xmlElement.Attributes["id"].Value;
                if (xmlElement.HasAttribute("order"))
                    member.Order = int.Parse(xmlElement.Attributes["order"].Value);
                member.Type = memberType.ToString();
                if (xmlElement.HasAttribute("hidden"))
                {
                    member.Hidden = xmlElement.Attributes["hidden"].Value;
                }
                else
                {
                    member.Hidden = "";
                }
                member.Hidden = member.Hidden.ToUpper().Replace("FALSE", "");
                var descr = xmlElement["descriptions"];
                if (descr != null && descr.HasAttribute("defaultDescription"))
                    member.Description = descr.Attributes["defaultDescription"].Value;

                if (xmlElement.HasAttribute("aggregationType"))
                    member.Aggregation = xmlElement.Attributes["aggregationType"].Value;

                if (xmlElement.HasAttribute("descriptionColumnName"))
                    member.LabelColumn = xmlElement.Attributes["descriptionColumnName"].Value;

                var localVariable = xmlElement["localVariable"];
                if (localVariable != null && localVariable.InnerText != null)
                    member.LocalVariable = localVariable.InnerText.Replace("&quot", "").Replace(@"""", "").Replace(@"#", "");

                var measureMapping = xmlElement["measureMapping"];
                if (measureMapping != null)
                    ProcessMapping(measureMapping, member);

                var keyMapping = xmlElement["keyMapping"];
                if (keyMapping != null)
                    ProcessMapping(keyMapping, member);

                var formula = xmlElement["formula"];
                if (formula != null && formula.InnerText != null)
                    member.ColumnFormula = formula.InnerText.Replace("&quot", "").Replace(@"""", "");
                viewMembers.Add(member);
            }
        }