hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: setting User agent? Parsing HTML?
Date Mon, 09 Feb 2004 07:42:33 GMT
Hello Tom,

You can set the USER_AGENT property in the
HttpMethodParams.

HTML parsing is totally out of scope of the HTTP client.
There are other projects that provide HTML parsers,
including one on Sourceforge:
http://sourceforge.net/projects/javahtmlparser
You may also want to check the open source software
from W3C:
http://www.w3.org/Status
There's a list of components towards the bottom of the
page.

cheers,
  Roland







"TP Diffenbach" <tp@diffenbach.org>
09.02.2004 01:40
Please respond to "Commons HttpClient Project"
 
        To:     <commons-httpclient-dev@jakarta.apache.org>
        cc: 
        Subject:        setting User agent? Parsing HTML?


Using the jakarta commons httpclient api, is there an easier way of 
setting
the User-agent header than adding it to each HttpMethod, as in:


      HttpMethod method = new GetMethod(loginUrl);
      method.setRequestHeader( "User-Agent", useragent ) ;



Once I've gotten a response body, are there any classes to parse it into 
an
HTML tree? I'm particularly interested in finding forms and their
attributes, so as to fill in the form and POST it.

Thanks,
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: 
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: 
commons-httpclient-dev-help@jakarta.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message