private static Template.Parameter ReadParameter(XElement xePar, ErrorCollector errorCollector)
        {
            Template.Parameter par = new Template.Parameter();
            foreach (XElement xe in xePar.Elements())
            {
                if (xe.Value == null)
                {
                    continue;
                }
                switch (GetXEleName(xe))
                {
                case "Name": par.name = xe.Value; break;

                case "VarName": par.variableName = xe.Value; break;

                case "BoolValue": par.boolValue = errorCollector.XEleGetBool(xe, xePar, par.name); break;

                case "NumericValue": par.numericValue = errorCollector.XEleGetDouble(xe, xePar, par.name); break;

                case "Reform": par._reform = errorCollector.XEleGetBool(xe, xePar, par.name); break;

                default: errorCollector.AddXmlUnkownEleError(xe, xePar, par.name); break;
                }
            }
            return(par);
        }
        private static Template.Page.Table.Column ReadColumn(XElement xeCol, ErrorCollector errorCollector)
        {
            Template.Page.Table.Column col = new Template.Page.Table.Column();
            foreach (XElement xe in xeCol.Elements())
            {
                if (xe.Value == null)
                {
                    continue;
                }
                switch (GetXEleName(xe))
                {
                case "Name": col.name = xe.Value; break;

                case "IsVisible": col.isVisible = errorCollector.XEleGetBool(xe, xeCol, col.name); break;

                case "HasSeparatorBefore": col.hasSeparatorBefore = errorCollector.XEleGetBool(xe, xeCol, col.name); break;

                case "HasSeparatorAfter": col.hasSeparatorAfter = errorCollector.XEleGetBool(xe, xeCol, col.name); break;

                case "TiesWith": col.tiesWith = errorCollector.XEleGetDouble(xe, xeCol, col.name); break;

                case var ctf when commonTableFields.Contains(ctf): ReadCommonTableField(xe, col, errorCollector, xeCol, col.name); break;

                default: errorCollector.AddXmlUnkownEleError(xe, xeCol, col.name); break;
                }
            }
            return(col);
        }
        private static Template.TemplateInfo.OptionalVariable ReadOptionalVariable(XElement xeOV, ErrorCollector errorCollector)
        {
            Template.TemplateInfo.OptionalVariable ov = new Template.TemplateInfo.OptionalVariable();
            foreach (XElement xe in xeOV.Elements())
            {
                if (xe.Value == null)
                {
                    continue;
                }
                switch (GetXEleName(xe))
                {
                case "Name": ov.name = xe.Value; break;

                case "ReadVar": ov.readVar = xe.Value; break;

                case "DefaultValue": ov.defaultValue = errorCollector.XEleGetDouble(xe, xeOV, ov.name); break;

                default: errorCollector.AddXmlUnkownEleError(xe, xeOV, ov.name); break;
                }
            }
            return(ov);
        }