Created
March 20, 2012 08:13
-
-
Save wakuteka/2132698 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
# Perform a google search | |
doc = Nokogiri::XML(open('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=snp&id=7574865&report=XML&mode=xml')) | |
# Print out each link using a CSS selector | |
doc.search('Rs Assembly Component MapLoc FxnSet').each do |link| | |
puts link.attribute('mrnaAcc').to_s + '.' +link.attribute('mrnaVer').to_s | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment