sparklemotion / nokogiri

Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
https://nokogiri.org/
MIT License
6.14k stars 899 forks source link

Not rerturn XML with Nokogiri #1088

Closed ranielli closed 10 years ago

ranielli commented 10 years ago

rb(main):006:0> require "nokogiri" => true irb(main):007:0> require "open-uri" => true

irb(main):012:0> teste = Nokogiri::XML(open(%Q{http://spotlight.dbpedia.org/rest/annotate/?text=#{"Barcelona%20is%20team%20soccer%20in%20Brazil"}}))

Result is HTML , but i need to XML

help me?

knu commented 10 years ago

Can you please elaborate on your expectation and the actual value?

Nokogiri::XML() should return a Nokogiri::XML::Document object, while Nokogiri::HTML() should return a Nokogiri::HTML::Document object. It's that simple.

knu commented 10 years ago

I'm closing this since it is not clear what this issue is about.