Exemple #1
0
        public void getJobsFromSource()
        {
            string      url = @"http://api.indeed.com/ads/apisearch?publisher=5566998848654317&v=2&q=%22%22&filter=1%22%22&limit=25";
            XmlDocument doc = new XmlDocument();

            doc.Load(url);
            int totalResults = int.Parse(doc.SelectSingleNode("response /totalresults").InnerText);

            for (int i = 0; i < totalResults; i += 25)
            {
                string                       newUrl         = @"http://api.indeed.com/ads/apisearch?publisher=5566998848654317&v=2&q=%22%22&filter=1&limit=25&start={i}";
                XmlReaderSettings            settings       = new XmlReaderSettings();
                XmlSchemaCompilationSettings schemaSettings = new XmlSchemaCompilationSettings();
                settings.ValidationType   = ValidationType.None;
                settings.IgnoreWhitespace = true;
                XmlReader xmlReader = XmlReader.Create(newUrl, settings);
                while (!xmlReader.EOF)
                {
                    if (xmlReader.Name != "result")
                    {
                        xmlReader.ReadToFollowing("result");
                    }
                    if (!xmlReader.EOF)
                    {
                        ds.ReadXml(xmlReader);
                    }
                }
            }
        }
Exemple #2
0
#pragma warning restore 618

        internal void CompileSchemaInSet(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings) {
            Debug.Assert(this.isPreprocessed);
            Compiler setCompiler = new Compiler(nameTable, eventHandler, null, compilationSettings);
            setCompiler.Prepare(this, true);
            this.isCompiledBySet = setCompiler.Compile();
        }