public XmlDocument ProcessSite(string  url, StringCollection keywords, string sitename, XmlDocument doc)
        {
            Console.WriteLine("Number of keywords:" + keywords.Count.ToString());
            /*			StringBuilder sbResult = new StringBuilder("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"+ System.Environment.NewLine);
            sbResult.Append("<?xml-stylesheet type=\"text/xslt\" href=\"" +ranker.lib.libConfig.GetConfigPath() +  Path.DirectorySeparatorChar + "result.xsl\"?>");
            sbResult.Append("<resultset>"+ System.Environment.NewLine);
            sbResult.Append("<url>"+ System.Environment.NewLine);
            sbResult.Append("" + url + System.Environment.NewLine);
            sbResult.Append("</url>"+ System.Environment.NewLine);
            sbResult.Append("<google>"+ System.Environment.NewLine);
            sbResult.Append("<keywords>"+ System.Environment.NewLine);
            */			int position ;

            string[] keys = new string[keywords.Count];

            for (int i=0;i<keywords.Count;i++) {

                Console.WriteLine("Querying for: " +keywords[i]);
                position = this.GetPosition(keywords[i],url)	;
                keys[i] = keywords[i]+":"+position;
            //        		sbResult.Append("<keyword name=\"" + keywords[i] + "\">" + position + "</keyword>" + System.Environment.NewLine);
                Console.WriteLine("done Querying for: " +keywords[i]);
                Console.WriteLine("###############");
            }
            Console.WriteLine("Getting number of backlinks");
            //        	sbResult.Append("</keywords>"+ System.Environment.NewLine);
            //        	sbResult.Append("<backlinks>"+ System.Environment.NewLine);
            int bl = this.GetBackLinks(url);
            //        	sbResult.Append("" + bl.ToString() + System.Environment.NewLine);
             //       	sbResult.Append("</backlinks>"+ System.Environment.NewLine);
            //        	sbResult.Append("</google>"+ System.Environment.NewLine);
            //        	sbResult.Append("</resultset>");
            libResults lr = new libResults();
            doc = lr.AddEngine("google",keys,bl.ToString(),doc);
            //			resultUrl = lr.generateHtml(resultUrl);
            //			Console.WriteLine("antes");
            //			lr.AddEngine("google","pedo:1;culo:4;no se:7","1560");
            //			Console.WriteLine("despues");
            //        	sbResult = null;
            //        	Console.WriteLine("Resultados: {0}",resultUrl);
            return doc;
        }
        public XmlDocument ProcessSite(string  url, StringCollection keywords, string sitename, XmlDocument doc)
        {
            Console.WriteLine("Number of keywords (YahooAPI):" + keywords.Count.ToString());
            int position ;

            string[] keys = new string[keywords.Count];

            for (int i=0;i<keywords.Count;i++) {

                Console.WriteLine("Querying for: " +keywords[i]);
                position = this.GetPosition(keywords[i],url)	;
                keys[i]= keywords[i]+":"+position;
            //        		sbResult.Append("<keyword name=\"" + keywords[i] + "\">" + position + "</keyword>" + System.Environment.NewLine);
                Console.WriteLine("done Querying for: " +keywords[i]);
                Console.WriteLine("###############");
            }
            Console.WriteLine("Getting number of yahoo backlinks");
            //        	sbResult.Append("</keywords>"+ System.Environment.NewLine);
            //        	sbResult.Append("<backlinks>"+ System.Environment.NewLine);
            string bl = this.GetBackLinks(url);
            //        	sbResult.Append("" + bl.ToString() + System.Environment.NewLine);
            //        	sbResult.Append("</backlinks>"+ System.Environment.NewLine);
            //        	sbResult.Append("</resultset>");
            //        	libResults lr = new libResults();
            //        	string resultUrl = lr.SaveResults(sbResult.ToString(),sitename);
            //			resultUrl = lr.generateHtml(resultUrl);
            //        	sbResult = null;
            Console.WriteLine("Yahoo Backlinks: {0}",bl);
            libResults lr = new libResults();
            doc = lr.AddEngine("yahoo",keys,bl.ToString(),doc);
            Console.WriteLine("AddEngine");
            return doc;
        }