Reputation: 110267
How would I get the following (using the %
for a LIKE statement) --
assets['HasEN'] = self.node.xpath('//data_file[@role="source"]/locale[@name="en%"]')
In other words, the name could be en
, it could be en-US
, it could be en-GB
, etc.
Is there a way to do that with lxml
or do I have to do that after parsing the XML?
Upvotes: 6
Views: 4397