Help with libxml

hi - i’m pulling my hair out. the find method simply won’t work for

here’s my xml doc:

that’s it. now after parsing, i do


and i get a result with size 0. i’ve tried everything. is there a
trick to using libxml that i’m missing?

thanks, for any help,

Loading development environment (Rails 2.3.3)
require ‘xml’

require ‘xml’
=> []

doc = XML::Document.file(“public/my.xml”)
=> <?xml version="1.0" encoding="UTF-8"?>

nodes = doc.find(’/top/first’)
=> #LibXML::XML::XPath::Object:0x282c3bc

nodes.each do |node|
?> puts node


=> #LibXML::XML::XPath::Object:0x282c3bc

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs