Help with Nokogiri

Hi !
I’m currently trying to parse this XML :
http://leapxl.com/special/xml-rss2.xml
(In french)
I added the START and STOP tags.

I just want to get an array with everything between START and STOP, for
each
If it’s not clear enough, just go here :
http://leapxl.com/special/xml-rss.xml
Everything between START and STOP, in an array.

Thanks in advance !

On Nov 12, 2013, at 10:46 AM, Paul K. [email protected] wrote:

Everything between START and STOP, in an array.

Thanks in advance !


Posted via http://www.ruby-forum.com/.

What code have you got so far, and how is it not working?

I got this :
frdoc = Nokogiri::XML( open(“http://www.dicocitations.com/xml-rss2.php”)
)
frcits = doc.xpath(’//description’)

But it’s not complete, it lacks the CDATA (and everything after )
suppression.

OK thanks, I’ll try it this evening

On Tue, 2013-11-12 at 18:08 +0100, Paul K. wrote:

I got this :
frdoc = Nokogiri::XML( open(“http://www.dicocitations.com/xml-rss2.php”)
)
frcits = doc.xpath(’//description’)

But it’s not complete, it lacks the CDATA (and everything after )
suppression.

frcits.each do |ea|
puts ea.name
puts ea.children
end

If you have received the message in error, please advise the sender by
reply email and please delete the message. This message contains
information which may be confidential or otherwise protected. Unless
you are the addressee (or authorized to receive for the addressee), you
may not use, copy, or disclose to anyone the message or any information
contained in the message.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs