If it is just a standard HTML page you can just search it as a string.
I attached some code that I have used in the past to get data from a
webpage. In this example I was just searching the _download string for
certain keywords.
/// <summary>
/// Defines the different connection types available to retrieving whois
data.
/// </summary>
public enum CONNECTION_TYPE
{
/// <summary>Uses GET as the method for sending data to the Server</summary>
GET,
/// <summary>Uses POST as the method for sending data to the
Server</summary>
POST
}
protected void Connect()
{
string serverUrl = null, postData = null;
byte[] myDataBuffer = null;
WebClient httpClient = new WebClient();
try
{
// Generate Post Data
postData = HttpUtility.UrlEncode( _additionalPostData ) );
// Connect to the Server.
switch ( _connectionType )
{
case CONNECTION_TYPE.GET:
serverUrl = _server + "?" + postData;
myDataBuffer = httpClient.DownloadData(serverUrl);
break;
case CONNECTION_TYPE.POST:
serverUrl = _server;
httpClient.Headers.Add("Content-Type","application/x-www-form-urlencoded");
byte[] postArray = Encoding.ASCII.GetBytes( postData );
myDataBuffer = httpClient.UploadData(serverUrl,"POST",postArray);
break;
}
_download = Encoding.ASCII.GetString(myDataBuffer);
_isConnected = true;
}
catch (Exception e)
{
_isConnected = false;
throw (e);
}
}
"Joerg Jooss" <jo*********@gmx.net> wrote in message
news:Oi*************@tk2msftngp13.phx.gbl...
Ben Dewey wrote: You can do this by using the System.Web.WebClient object.
http://msdn.microsoft.com/library/de...sctorTopic.asp
has an example of how to use it. you can even parse that string in to
a XmlTextReader and it will allow to you to traverse nodes as if it
were a xml document.
Only if it is XHTML.
Cheers,
--
Joerg Jooss
jo*********@gmx.net