# HG changeset patch # User paulb # Date 1067796891 0 # Node ID 77fd0473570518402625607485289dad9a9b5f03 # Parent 052833494789895d6b184561213f4dc7d1497f90 [project @ 2003-11-02 18:14:51 by paulb] Added nextSibling as a property of Node. diff -r 052833494789 -r 77fd04735705 __init__.py --- a/__init__.py Sun Nov 02 01:41:08 2003 +0000 +++ b/__init__.py Sun Nov 02 18:14:51 2003 +0000 @@ -169,6 +169,12 @@ else: return Node(self._node.parent) + def _nextSibling(self): + if self._node.next is not None: + return Node(self._node.next) + else: + return None + def hasAttributeNS(self, ns, localName): return self.getAttributeNS(ns, localName) is not None @@ -311,6 +317,7 @@ parentNode = property(_parentNode) nodeType = property(_nodeType) attributes = property(_attributes) + nextSibling = property(_nextSibling) def isSameNode(self, other): return self._node.nodePath() == other._node.nodePath()