Re: [xml] Strange results of xpath element search using string-value

2017-10-07 Thread Nick Wellnhofer
On 30/09/2017 19:37, Алексей Алексей wrote: $ echo 'fed' | \ xmllint --xpath '//bbb[. = "fed"]' - XPath set is empty Fixed with https://git.gnome.org/browse/libxml2/commit/?id=5af594d8bc55121ae454cba4d05793d1db7ff612 Thanks for the report! Nick

Re: [xml] Strange results of xpath element search using string-value

2017-10-03 Thread Nick Wellnhofer
On 02/10/2017 19:58, Daniel Veillard wrote: hum ... XPath computes the string value correctly. there is something going on there. The bug is in xmlXPathNodeValHash. `string` must be reset to NULL in the default case of this switch statement: https://git.gnome.org/browse/libxml2/tree/

Re: [xml] Strange results of xpath element search using string-value

2017-10-02 Thread Daniel Veillard
On Sat, Sep 30, 2017 at 08:37:35PM +0300, Алексей Алексей wrote: >Hi, > >Can't understand the results of the following xpath queries: > >from lxml import etree >from io import StringIO >s = 'fed' >tree = etree.parse(StringIO(s)) >print(tree.xpath('//bbb[.="fed"]')) #Re

[xml] Strange results of xpath element search using string-value

2017-09-30 Thread Алексей Алексей
Hi, Can't understand the results of the following xpath queries: from lxml import etreefrom io import StringIOs = 'fed'tree = etree.parse(StringIO(s))print(tree.xpath('//bbb[.="fed"]')) #Returns nothingprint(tree.xpath('//bbb[contains(.,"fed")]')) #Returns barprint(tree.xpath('//bbb[normalize-space