Project

General

Profile

« Previous | Next » 

Revision 4033

xml_dom.py: value(), set_value(): Use new strings.isspace_none_str as sentinel None equivalent, to support cloning text nodes containing a sentinel None

View differences:

xml_dom.py
174 174

  
175 175
def value(node):
176 176
    value_ = util.do_ignore_none(lambda n: n.nodeValue, value_node(node))
177
    if value_ is strings.none_str: value_ = None # text node's None
177
    if value_ is strings.isspace_none_str: value_ = None # None equiv
178 178
    return value_
179 179

  
180 180
def is_whitespace(node):
......
192 192
    elif value_node_ != None:
193 193
        if is_elem(node): remove(value_node_)
194 194
        else:
195
            if is_text_node(node): value = strings.none_str # text node's None
195
            if is_text_node(node): value = strings.isspace_none_str # None equiv
196 196
            node.nodeValue = value
197 197

  
198 198
class NodeTextEntryIter:

Also available in: Unified diff