uxpath.py: bug
This commit is contained in:
parent
f85cd8aafb
commit
2fc7392fe1
|
@ -41,9 +41,9 @@ def dumprs(rs):
|
|||
nodeType = rs.nodeType
|
||||
if nodeType == Node.ELEMENT_NODE:
|
||||
print rs.toxml("utf-8")
|
||||
elif nodeType == ATTRIBUTE_NODE:
|
||||
elif nodeType == Node.ATTRIBUTE_NODE:
|
||||
print rs.value.encode("utf-8")
|
||||
elif nodeType == TEXT_NODE or nodeType == CDATA_SECTION_NODE:
|
||||
elif nodeType == Node.TEXT_NODE or nodeType == Node.CDATA_SECTION_NODE:
|
||||
print rs.data.encode("utf-8")
|
||||
else:
|
||||
unsupported = True
|
||||
|
@ -69,9 +69,9 @@ def updaters(rs, value, doc):
|
|||
rs.replaceChild(textNode, firstChild)
|
||||
else:
|
||||
rs.insertBefore(textNode, firstChild)
|
||||
elif nodeType == ATTRIBUTE_NODE:
|
||||
elif nodeType == Node.ATTRIBUTE_NODE:
|
||||
rs.value = value
|
||||
elif nodeType == TEXT_NODE or nodeType == CDATA_SECTION_NODE:
|
||||
elif nodeType == Node.TEXT_NODE or nodeType == Node.CDATA_SECTION_NODE:
|
||||
rs.data = value
|
||||
else:
|
||||
unsupported = True
|
||||
|
|
Loading…
Reference in New Issue