⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (371 Bytes)
Bug #14093
ยป bug_script.rb
script to reproduce -
jcavalieri (John Cavalieri)
, 11/08/2017 08:03 PM
#!/usr/bin/env ruby
require
'rexml/document'
xml_string
=
'<a><b><name/></b></a>'
rexml_doc
=
REXML
::
Document
.
new
(
xml_string
)
puts
"Considering this xml: "
puts
xml_string
puts
"
\n
The xpath '/a/b/name()' xpath should return the name of element 'a'. Instead it returns the child element 'name'.
\n\n
"
puts
'Output: '
puts
REXML
::
XPath
.
first
(
rexml_doc
,
'/a/b/name()'
)
(1-1/1)
Loading...