Browse Source

----------------------------------------------------------------------

Modified Files:
 	Utility.py -- isElement should return False if NOT an Element.

 ----------------------------------------------------------------------
main
Joshua Boverhof 21 years ago
parent
commit
271e93dfac
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      Utility.py

+ 1
- 1
Utility.py View File

@@ -325,7 +325,7 @@ class DOM:
def isElement(self, node, name, nsuri=None): def isElement(self, node, name, nsuri=None):
"""Return true if the given node is an element with the given """Return true if the given node is an element with the given
name and optional namespace uri.""" name and optional namespace uri."""
if node.nodeType == node.ELEMENT_NODE:
if node.nodeType != node.ELEMENT_NODE:
return 0 return 0
return node.localName == name and \ return node.localName == name and \
(nsuri is None or self.nsUriMatch(node.namespaceURI, nsuri)) (nsuri is None or self.nsUriMatch(node.namespaceURI, nsuri))


Loading…
Cancel
Save