Running this:
require 'rexml/document
REXML::Document.new(open("slashdot.xml")).write
I got output with empty <link> elements:
<item
rdf:about='http://science.slashdot.org/article.pl?sid=05/09/26/1551241&a
mp;from=rss'>
<title>Technology for Capturing 360 Degree Video</title>
<link/>
<dc:creator>ScuttleMonkey</dc:creator>
<dc:date>2005-09-26T18:01:00+00:00</dc:date>
<dc:subject>tech</dc:subject>
<slash:department>even-guesswork-can't-save-most-hollywood-pictures</sla
sh:department>
I'm running ruby from the one-click installer: ruby 1.8.2 (2004-12-25)
[i386-mswin32]
#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################
I'm not doing anything much more complicated than that in my other code,
but since that's embedded in mousehole, I'm guessing I've done something
stupid because I don't quite know what I'm doing there. For the record,
what I'm doing is:
document.each_element('//item/') do |e|
e.each_element('description') {|x| x.remove}
doc = read_xhtml_from(e.attributes['rdf:about']
+ "&mode=nocomment")
desc = REXML::Element.new('description')
doc.each_element('//div[@class="intro"]') do |x|
s = ""
x.write(s)
s.gsub!("—","—")
desc.text = s
end
e << desc
end
(trying to turn the slashdot feed into something more useful).
I don't see how any of that could have any effect on the <link> element
though.