Sha256: a7dd96c8ff934f69779bd775fb344c4eb956474c036c8d4dd1795fe6626da442

Contents?: true

Size: 549 Bytes

Versions: 4

Compression:

Stored size: 549 Bytes

Contents

#:invisible:
$:.unshift "../lib" #<=
#:visible:
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)#<=

XML::XXPath.new("/bar").all(d)#<=

XML::XXPath.new("/foo/bar").all(d.root)#<=

XML::XXPath.new("/bar").all(d.root)#<=


firstelt = XML::XXPath.new("/foo/bar/first").first(d)#<=

XML::XXPath.new("/first/second").all(firstelt)#<=

XML::XXPath.new("/second").all(firstelt)#<=

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
xml-mapping-0.9.1 examples/xpath_docvsroot.intin.rb
pdf-labels-1.0.0 vendor/xml-mapping/examples/xpath_docvsroot.intin.rb
xml-mapping-0.8.1 examples/xpath_docvsroot.intin.rb
xml-mapping-0.8 examples/xpath_docvsroot.intin.rb