Esempio n. 1
0
        public bool test3(string vsURL)
        {
            cWeb   oWeb        = new cWeb();
            string htmlContent = oWeb.GrabPageToString(vsURL);


            // Obtain the document interface
            IHTMLDocument2 htmlDocument = (IHTMLDocument2) new mshtml.HTMLDocument();

            // Construct the document
            htmlDocument.write(htmlContent);
            //htmlDocument.
            List <IHTMLElement> oOut = new List <IHTMLElement>();


            // Extract all elements
            IHTMLElementCollection allElements = htmlDocument.all;
            cFile oFile = new cFile("ele.txt");

            // Iterate all the elements and display tag names
            foreach (IHTMLElement element in allElements)
            {
                oFile.Write(element.tagName);
            }

            return(false);
        }
Esempio n. 2
0
        public bool DownloadFic(string vsURL)
        {
            cWeb oWeb = new cWeb();

            oWeb.GrabPageToFile(vsURL, "Test.html");


            return(false);
        }