Ticket #185 (closed defect: fixed)
XPath foo/bar/text() behaves like foo//bar/text()
| Reported by: | mestudd@… | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6 |
| Component: | XPath support | Version: | devel |
| Keywords: | Cc: |
Description
xml = XML('<root><foo><bar>Bar</bar><baz><bar>Quux</bar></baz>')
node = xml.select('foo/bar')
text = xml.select('foo/bar/text()')
node is correctly '<bar>Bar</bar>', but text is 'BarQuux', incorrectly adding the grandchild <bar> element text.
Attached is a patch for the unittests.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

