Non-Boost question: HTML parser with hpricot
Hi folks, Sorry for posting a question unrelated to boost. I know pretty well that boost has perfect solutions to it. But I am working on a legacy system using Hpricot of Ruby on Rail. So only Hpricot-specific suggestions please. Thank you. In my HTML parser, I can parse a html file with the following hpricot commands: (1) doc = open( "MyFileToParse.html" ) { |f| Hpricot(f) } (2) elements = (doc.search("/html/body/table/tr/td/table/tr/td/font") ) (3) puts (elements[13]).inner_html to get the following output: Giaever G, et al (2002). Functional profiling of the Saccharomyces c erevisiae genome. Nature, 418:387-91. [<a href=" http://www.ncbi.nlm.nih.gov/entr ez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=12140549&dopt=Abstract" target="_ blank">PubMed</a>] How can I proceed to get the following results (3) and (4) respectively? (3) Giaever G, et al (2002). Functional profiling of the Saccharomyces c erevisiae genome. Nature, 418:387-91. (4) http://www.ncbi.nlm.nih.gov/pubmed/12140549?dopt=Abstract NOTE: to get (4) I need to take two more steps: (5) replace "&" with "?" (6) replace "PubMed" with "pubmed" (this might be trivial, but how?) in the process of parsing in addition to "normal" HTML parsing. Thanks a lot in advance. Robert
Boost lzw wrote:
Hi folks,
Sorry for posting a question unrelated to boost. I know pretty well that boost has perfect solutions to it. But I am working on a legacy system using Hpricot of Ruby on Rail. So only Hpricot-specific suggestions please. Thank you.
Do you think that posting totally off-topic matters is OK as soon as you say "sorry"? Please bring this question somewhere else. - Volodya
On Fri, Jan 8, 2010 at 3:26 AM, Vladimir Prus
Boost lzw wrote:
Hi folks,
Sorry for posting a question unrelated to boost. I know pretty well that boost has perfect solutions to it. But I am working on a legacy system using Hpricot of Ruby on Rail. So only Hpricot-specific suggestions please. Thank you.
Do you think that posting totally off-topic matters is OK as soon as you say "sorry"? Please bring this question somewhere else.
There are people posting Hpricot questions in other C++ mailing lists too, I have no clue what is up with these retards, but they are getting irritating... I think they are just advertising and that account should be deleted and IP ignored... Yes, they have been irritating...
OvermindDL1 wrote:
On Fri, Jan 8, 2010 at 3:26 AM, Vladimir Prus
wrote: Boost lzw wrote:
Hi folks,
Sorry for posting a question unrelated to boost. I know pretty well that boost has perfect solutions to it. But I am working on a legacy system using Hpricot of Ruby on Rail. So only Hpricot-specific suggestions please. Thank you.
Do you think that posting totally off-topic matters is OK as soon as you say "sorry"? Please bring this question somewhere else.
There are people posting Hpricot questions in other C++ mailing lists too, I have no clue what is up with these retards, but they are getting irritating... I think they are just advertising and that account should be deleted and IP ignored... Yes, they have been irritating...
An interesting question is how this email appeared here in the first place. I though all Boost mailing lists are in 'moderate first post' mode, and a post titled "Non-Boost question: XXX" is not likely to be approved by a human. - Volodya
On Fri, Jan 8, 2010 at 4:48 AM, Vladimir Prus
OvermindDL1 wrote:
On Fri, Jan 8, 2010 at 3:26 AM, Vladimir Prus
wrote: Boost lzw wrote:
Hi folks,
Sorry for posting a question unrelated to boost. I know pretty well that boost has perfect solutions to it. But I am working on a legacy system using Hpricot of Ruby on Rail. So only Hpricot-specific suggestions please. Thank you.
Do you think that posting totally off-topic matters is OK as soon as you say "sorry"? Please bring this question somewhere else.
There are people posting Hpricot questions in other C++ mailing lists too, I have no clue what is up with these retards, but they are getting irritating... I think they are just advertising and that account should be deleted and IP ignored... Yes, they have been irritating...
An interesting question is how this email appeared here in the first place. I though all Boost mailing lists are in 'moderate first post' mode, and a post titled "Non-Boost question: XXX" is not likely to be approved by a human.
Good point, where are the all-powerful moderators? Or did this person circumvent the process by posting another post first elsewhere?
An interesting question is how this email appeared here in the first place. I though all Boost mailing lists are in 'moderate first post' mode, and a post titled "Non-Boost question: XXX" is not likely to be approved by a human.
Robert has posted on-topic previously. I'm sure he won't make the same mistake again - no need for a lynch mob. I suggest we all consider this topic closed now, regards, John.
Hi Folks,
My apology for you who feel so badly seeing an off-topic question. I am 100%
sure that you you are going to only read boost-ONLY question from me after
this email. I like boost mailing list very much and definitely will ask
boost-ONLY questions here.
Cheers!
Robert
On Fri, Jan 8, 2010 at 7:03 AM, John Maddock
An interesting question is how this email appeared here in the first place.
I though all Boost mailing lists are in 'moderate first post' mode, and a post titled "Non-Boost question: XXX" is not likely to be approved by a human.
Robert has posted on-topic previously. I'm sure he won't make the same mistake again - no need for a lynch mob.
I suggest we all consider this topic closed now, regards, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Fri, Jan 8, 2010 at 7:08 AM, Boost lzw
Hi Folks,
My apology for you who feel so badly seeing an off-topic question. I am 100% sure that you you are going to only read boost-ONLY question from me after this email. I like boost mailing list very much and definitely will ask boost-ONLY questions here.
My main issue is that this *exact* same question was asked on another C++ library mailing list, and your question is about a ruby library, it just makes *no* sense at all...
participants (4)
-
Boost lzw
-
John Maddock
-
OvermindDL1
-
Vladimir Prus