Re: Two ElementTree questions

2006-04-27 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > 1) It appears as if the following logic works for determining whether > an element is a parent: > > # assume elem is an ElementTree element > if (elem.getchildren() == None): > print 'this element is not a parent' > else: > print 'this element is a parent' > > My

Two ElementTree questions

2006-04-27 Thread mirandacascade
1) It appears as if the following logic works for determining whether an element is a parent: # assume elem is an ElementTree element if (elem.getchildren() == None): print 'this element is not a parent' else: print 'this element is a parent' My question is this: are there any other ways