Revision 1689
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/xpath.py | ||
---|---|---|
315 | 315 |
'''Runs get() and returns the first result''' |
316 | 316 |
return util.list_get(get(*args, **kw_args), 0) |
317 | 317 |
|
318 |
def get_value(*args, **kw_args): |
|
319 |
'''Runs get_1() and returns the value of any result node''' |
|
320 |
return util.do_ignore_none(xml_dom.value, get_1(*args, **kw_args)) |
|
321 |
|
|
318 | 322 |
def put_obj(root, xpath, id_, has_types, value=None): |
319 | 323 |
if util.is_str(xpath): xpath = parse(xpath) |
320 | 324 |
|
Also available in: Unified diff
xpath.py: Added get_value() to run get_1() and returns the value of any result node