Project

General

Profile

« Previous | Next » 

Revision 1005

xpath.py: get(): Go to root when empty element is encountered at the beginning of an XPath. Added allow_rooted parameter to turn off this functionality when XPaths with a leading slash should not be considered rooted.

View differences:

map
167 167
            in_db.close()
168 168
        elif in_is_xml:
169 169
            def get_value(in_, row):
170
                nodes = xpath.get(row, in_)
170
                nodes = xpath.get(row, in_, allow_rooted=False)
171 171
                if nodes != []: return xml_dom.value(nodes[0])
172 172
                else: return None
173 173
            rows = xpath.get(doc0.documentElement, in_root, limit=end)

Also available in: Unified diff