# HG changeset patch # User dfraser # Date 1223564027 0 # Node ID 79a422aeae7e44fd4ae31696ef1f2a84093fad48 # Parent 17ad4028ba1459636479e605b486dea723badb18 If an empty string is present as a child, writing to XML fails without this patch diff --git a/bitten/util/xmlio.py b/bitten/util/xmlio.py --- a/bitten/util/xmlio.py +++ b/bitten/util/xmlio.py @@ -76,7 +76,7 @@ if isinstance(child, (Element, ParsedElement)): child.write(out, newlines=newlines) else: - if child[0] == '<': + if child.startswith('<'): out.write('') else: out.write(_escape_text(child))