Esempio n. 1
0
        private List <XmlReadInstructions> GetInstructions(IShellContext context)
        {
            if (!AnalyseColumns)
            {
                var res = new List <XmlReadInstructions>();
                if (!String.IsNullOrEmpty(XPath) && Columns.Any())
                {
                    res.Add(new XmlReadInstructions
                    {
                        Columns = Columns,
                        XPath   = XPath,
                    });
                }
                if (Instructions != null)
                {
                    res.AddRange(Instructions);
                }
                return(res);
            }

            string file = context.ResolveFile(context.Replace(File), ResolveFileMode.Input);

            return(XmlTableAnalyser.AnalyseFile(file, true));
        }
Esempio n. 2
0
        public TableInfo GetRowFormat(IShellContext context)
        {
            var instructions = GetInstructions(context);

            return(XmlTableAnalyser.GetRowFormat(instructions));
        }