Exemple #1
0
        public bool PrintCrawlSessionToXml()
        {
            XmlWriter Xml;

            try { Xml = XmlWriter.Create(Config.OutputPath); }
            catch { return(false); }

            try
            {
                Xml.WriteStartDocument();
                Xml.WriteStartElement("SITE");
                Xml.WriteAttributeString("url", Config.RemotePath);
                Xml.WriteAttributeString("depth", Config.CrawlerMaxDepth.ToString());
                RootDocument.PrintToXmlRecursive(Xml);
                Xml.WriteEndElement();
                Xml.WriteEndDocument();
                Xml.Close();
                return(true);
            }
            catch
            {
                Xml.Close();
                return(false);
            }
        }