Docs tells you to navigate through nodes. Loop with Ish, and a node will be returned to the block. However, this is not true. The "node" which is back is just an example of a reader.
I need to get a node object so that I can reach them:
node.content However, this is bad Documentation appears. At any rate, I can not know how easy it is to work after 2 hours of trying.
Are you looking for something like that?
Expected 'nogogiri' xml = & lt; & Lt; Eoxml & lt; X xmlns: tenderlove = 'http: //tenderlovemaking.com/'> & Lt; Tenderlove: foo awesome = 'true' & gt; Snuggles! & Lt; / Tenderlove: foo & gt; & Lt; True & gt; Echo chamber & lt; / True & gt; & Lt; / X & gt; Eoxml doc = Notgory :: XML :: Reader (XML) doc.each do | Node | If node.attributes == {"awesome" = & gt; "True"} puts node.inner_xml end-end # = & gt; Snuggles!
Comments
Post a Comment