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