Project

General

Profile

« Previous | Next » 

Revision 4039

Added get_values()

View differences:

lib/xpath.py
337 337
    '''Runs get() and returns the first result'''
338 338
    return util.list_get(get(*args, **kw_args), 0)
339 339

  
340
def get_values(*args, **kw_args):
341
    '''Runs get() and returns the value node (first child) of each node'''
342
    return map(xml_dom.value_node, get(*args, **kw_args))
343

  
340 344
def get_value(*args, **kw_args):
341 345
    '''Runs get_1() and returns the value of any result node'''
342 346
    return util.do_ignore_none(xml_dom.value, get_1(*args, **kw_args))

Also available in: Unified diff