- Timestamp:
- 05/10/04 13:32:03 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBFoundation/RBFoundation/XMLNode.py
r755 r758 48 48 def __ne__(self, other): 49 49 return not self.__eq__(other) 50 def __repr__(self): 51 return "*" 50 52 _any = matchall() 51 53 … … 345 347 """Returns a generator to iterate through the matching child node indicies of xmlnode. 346 348 obj.enumnodes(node=_any, namespace=_any, prefix=_any)""" 347 idxonly = kw.get('idxonly', None) 348 if idxonly is not None: del kw['idxonly'] 349 if 'idxonly' in kw: 350 idxonly = kw['idxonly'] 351 del kw['idxonly'] 352 else: idxonly = False 349 353 match = makenodematcher(*args, **kw) 350 354 idx = 0 351 355 for each in self.elems: 352 356 if not isinstance(each, basestring): 353 if match(*args, **kw): 354 if idxonly: yield idx 355 else: yield idx, each 357 if match(each): 358 if idxonly: 359 yield idx 360 else: 361 yield idx, each 356 362 idx += 1 357 363
