Displaying 1 result from an estimated 1 matches for "rec_imgs".
2009 Nov 11
2
nokogiri: parsing tags
Hello,
I''m trying to use nokogiri gem to parse individual xhtml tags (not the
whole html document) and preform some processing on them.
Heres an example of a string that I want to process:
str = ''<img
src="http://www.canadascapital.gc.ca/data/2/rec_imgs/5005_Pepsi_H1NB.gif"/>
some text<a href="#">test</a> ....''
The following code will add html/body and head tags, and also document
type which I dont want (I know I could go though html->body children of
the root node but I suspect there is some better way t...