From: chickenkiller Date: 2007-04-13T19:00:06+09:00 Subject: Re: Hpricot innerTEXT? On Apr 13, 10:11 am, Bontina Chen wrote: > Hi > > I'm using hpricot to parse the following file. > > rdf:about="http://del.icio.us/url/50666d1a3fe2b942b20819ec2919d2b7#morwyn"> > [from morwyn] * HTML for the Conceptually Challenged > http://del.icio.us/url/50666d1a3fe2b942b20819ec2919d2b7#morwyn > HTML for the Conceptually Challenged. Very basic tutorial, > plainly worded for people who hate to read instructions. > morwyn > 2006-10-10T07:28:28Z > html imported webpagedesign > > > > > > > > > > I'm trying to get the content from like this > > doc = Hpricot.parse(File.read("965.xhtml")) > > (doc/"item").each do |t| > > puts (t/"dc:subject").innerTEXT > > end > > but I got > > html internet tutorial web > > while I only need "html internet tutorial web" > > Anyone knows what's the right function to call? > > THanks > > -- > Posted viahttp://www.ruby-forum.com/. replace innerTEXT by inner_html: (doc/"item").each do |t| puts (t/"dc:subject").inner_html end regards Lionel