From: "Kyle X." Date: 2011-04-21T00:54:59+09:00 Subject: Re: Nokogiri parsing question Thank you for the reply Robert; however, I cannot get it to work still. I left out a lit bit of the xml when I wrote the first post. Both cases have already have a namespace defined for them. Case 1) These two lines would be added to both cases. The actual file reads: The exact code I have been trying to run is: $http = "http://www.iai-tech.org/ifcXML/IFC2x3/FINAL" ref = "i17855" $doc_noko = Nokogiri::XML(File.read(filename)) x = $doc_noko.xpath("//uosNS:*[@id='#{ref}']//uosNS:*[@pos='1']", {"uosNS" => $http}) #=> nil It reads for "//uosNS:*[@id='#{ref}']" but the "//uosNS:*[@pos='1']" is where it is not working as intended returning a nil value. With these two new lines in mind any ideas for the two cases? -- Posted via http://www.ruby-forum.com/.