Sha256: c58454ba1e0982c047914ed91dfceffd000586886653e55eb322b174e790efbd
Contents?: true
Size: 637 Bytes
Versions: 6
Compression:
Stored size: 637 Bytes
Contents
require 'xml/xxpath' d=REXML::Document.new <<EOS <foo> <bar x="hello"> <first> <second>pingpong</second> </first> </bar> <bar x="goodbye"/> </foo> EOS XML::XXPath.new("/foo/bar").all(d) => [<bar x='hello'> ... </>, <bar x='goodbye'/>] XML::XXPath.new("/bar").all(d) => [] XML::XXPath.new("/foo/bar").all(d.root) => [] XML::XXPath.new("/bar").all(d.root) => [<bar x='hello'> ... </>, <bar x='goodbye'/>] firstelt = XML::XXPath.new("/foo/bar/first").first(d) => <first> ... </> XML::XXPath.new("/first/second").all(firstelt) => [] XML::XXPath.new("/second").all(firstelt) => [<second> ... </>]
Version data entries
6 entries across 6 versions & 2 rubygems