Project

General

Profile

« Previous | Next » 

Revision 1239

xpath.py: get(): Added support for lookup-only elements which are not created if they don't exist

View differences:

lib/xpath.py
232 232
    
233 233
    # Create node
234 234
    if nodes == []:
235
        if not create: return []
235
        if not create or elem.is_lookup_only: return []
236 236
        if elem.is_attr:
237 237
            root.setAttribute(elem.name, '')
238 238
            node = root.getAttributeNode(elem.name)

Also available in: Unified diff