Revision 31
Added by Aaron Marcuse-Kubitza over 13 years ago
scripts/data2xml/data2xml | ||
---|---|---|
30 | 30 |
path = row[dest_idx] |
31 | 31 |
if name != '' and path != '': |
32 | 32 |
if path.startswith('?'): path = path[1:] |
33 |
has_types = path.find('/*s/') # *s used for type elem
|
|
33 |
if path.startswith('/*s/'): has_types = True # *s used for type elem
|
|
34 | 34 |
path = path.replace('<name>', name) |
35 | 35 |
path = re.sub(r'\*(?=\w*(?:->/[^/]+)?/(\w+))', r'\1', path) |
36 | 36 |
mappings[name] = xpath.XpathParser(path).parse() |
Also available in: Unified diff
In data2xml, fixed determination of which nesting level to put IDs on