Source: Use IHTMLDocument2 interface to get the desired data on the page instead of regular expressions
The original Published time: 2010-07-01--from my Baidu article [imported by moving tools]
1. Use Ihtmldocument2::all to obtain all elements;
2. Use Ihtmlelementcollection::tags to obtain the element labeled span;
3. Use Ihtmlelement::classname to obtain an element of class named EX;
4. Use Ihtmlelement::innertext to obtain the text.
IHTMLDocument2 doc = new Htmldocumentclass ();
Doc.write (new object[] {ie. Outstring});
Doc.close ();
if (doc! = null)
{
IHTMLElementCollection IEC = (ihtmlelementcollection) doc.all.tags ("DD");
foreach (IHTMLElement II in IEC)
{
if (Ii.getattribute ("onmouseout", 0). ToString ()! = "")
{
Console.WriteLine (Ii.innertext);
string str = Ii.innertext;
}
}
}
Use the IHTMLDocument2 interface to get the data you want on the page instead of the regular expression