From 2fc7392fe126de48b888d696bee3fcd5bab0f75e Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sat, 6 Aug 2016 11:27:50 +0400 Subject: [PATCH] uxpath.py: bug --- lib/pyulib/src/uapps/uxpath.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pyulib/src/uapps/uxpath.py b/lib/pyulib/src/uapps/uxpath.py index 37be711..b2afa13 100755 --- a/lib/pyulib/src/uapps/uxpath.py +++ b/lib/pyulib/src/uapps/uxpath.py @@ -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