Revision 4038
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/xml_dom.py | ||
---|---|---|
82 | 82 |
|
83 | 83 |
def is_empty(node): |
84 | 84 |
for child in NodeIter(node): |
85 |
if not is_comment(child): return False
|
|
85 |
if not (is_whitespace(child) or is_comment(child)): return False
|
|
86 | 86 |
return True |
87 | 87 |
|
88 | 88 |
def clean_comment(str_): |
Also available in: Unified diff
xml_dom.py: is_empty(): Treat whitespace-only text nodes (including text nodes containing empty strings) as empty. This will also support None equivalents in text nodes, because they are isspace_none_str, which is considered whitespace.