Re: [Htmlparser-user] Button Links
Brought to you by:
derrickoswald
From: Derrick O. <der...@ro...> - 2007-04-01 17:00:16
|
I believe you would just add it as a parameter. Using the FAQ example it would be done like so: buffer = new StringBuffer (1024); // 'input' fields separated by ampersands (&) buffer.append ("world=1"); // name=value or buffer.append ("world="); // if the nothing option is selected // etc. ----- Original Message ---- From: Cliff Holbrook <cli...@gm...> To: htmlparser user list <htm...@li...> Sent: Sunday, April 1, 2007 12:42:06 PM Subject: Re: [Htmlparser-user] Button Links After looking closer at the the code, it seems as though there is a "select" menu in the POST that I cannot figure out how to set. The HTML for it is <select name="world"> <option></option> < option value="1" selected="selected">World 1</ option></select> I can't find any info in the how to use POST on how to submit the information. It also seems to me as though the default is to have "World 1" selected, and so I don't understand why it has to have it sent in again. Thank you for your help On 4/1/07, Derrick Oswald <der...@ro...> wrote: I'm not sure what your question is. As it says in the FAQ example a StringBean is used: bean = new StringBean (); bean.setConnection (connection); mText = bean.getStrings (); But a parser could be used by just replacing the last three lines in the try block with: parser = new Parser (); parser.setConnection (connection); // ... do parser operation So, you are actually passing the fully functional URL connection object to the Parser instead of making it do a GET behind the scenes on a (string) URL. If what you are asking is how to use the parser, check out the Parser javadoc , basically get a list of nodes and do something with it: NodeList list = parser.parse (null); // do something with your list of nodes. ----- Original Message ---- From: Cliff Holbrook <cli...@gm...> To: htmlparser user list <htm...@li... > Sent: Sunday, April 1, 2007 1:21:27 AM Subject: Re: [Htmlparser-user] Button Links So after the POST has been completed sucessfully, how does one than perform parsing operations on what has occurred? In other words, how would the URL of the site the program gets routed to be found? |