Skip to content

Instantly share code, notes, and snippets.

@solars
Created February 1, 2011 21:08
Show Gist options
  • Save solars/806684 to your computer and use it in GitHub Desktop.
Save solars/806684 to your computer and use it in GitHub Desktop.
require "rubygems"
require "nokogiri"
f = File.open "ota/samples/rateplan-rs.xml"
doc = Nokogiri::XML(f)
f.close
ns = {"http://www.opentravel.org/OTA/2003/05"=>"http://www.opentravel.org/OTA/2003/05", "xmlns:ota"=>"http://www.opentravel.org/OTA/2003/05", "xmlns:seekda"=>"http://connect.seekda.com/2009/04"}
xp = ".//ota:RatePlans"
puts doc.xpath(xp, ns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment