Project

General

Profile

« Previous | Next » 

Revision 4237

xml_func.py: Added _exists()

View differences:

lib/xml_func.py
168 168
# Function names must start with _ to avoid collisions with real tags
169 169
# Functions take params (node) and have no return value
170 170

  
171
#### Logic
172

  
173
def _exists(node):
174
    '''Returns whether its node is non-empty'''
175
    xml_dom.replace_with_text(node, not xml_dom.is_empty(node))
176
simplifying_funcs['_exists'] = _exists
177

  
171 178
##### XML functions
172 179

  
173 180
# Function names must start with _ to avoid collisions with real tags

Also available in: Unified diff