Revision 994
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xml_func.py | ||
---|---|---|
25 | 25 |
except ValueError, e: raise SyntaxException(e) |
26 | 26 |
return map_items(conv, xml_dom.TextEntryOnlyIter(items)) |
27 | 27 |
|
28 |
def ignore(items): |
|
29 |
'''Used to "comment out" an XML subtree''' |
|
30 |
return None |
|
31 |
|
|
28 | 32 |
def alt(items): |
29 | 33 |
items = list(items) |
30 | 34 |
items.sort() |
... | ... | |
117 | 121 |
|
118 | 122 |
# Function names must start with _ to avoid collisions with real tags |
119 | 123 |
# Functions take arguments (items) |
120 |
funcs = {'_alt': alt, '_merge': merge, '_label': label, '_range': range_,
|
|
121 |
'_avg': avg, '_noCV': no_cv, '_date': date, '_name': name, |
|
124 |
funcs = {'_alt': alt, '_ignore': ignore, '_merge': merge, '_label': label,
|
|
125 |
'_range': range_, '_avg': avg, '_noCV': no_cv, '_date': date, '_name': name,
|
|
122 | 126 |
'_namePart': name_part} |
123 | 127 |
|
124 | 128 |
def process(node, on_error=exc.raise_): |
Also available in: Unified diff
xml_func.py: Added _ignore func to "comment out" an XML subtree