Re: lxml ignore none in getchildren

2016-10-04 Thread Peter Otten
Sayth Renshaw wrote: > I am following John Shipmans example from > http://infohost.nmt.edu/~shipman/soft/pylxml/web/Element-getchildren.html > xml = ''' > ... ''' pen = etree.fromstring(xml) penContents = pen.getchildren() for content in penContents: > ... print "%-10s %

lxml ignore none in getchildren

2016-10-04 Thread Sayth Renshaw
I am following John Shipmans example from http://infohost.nmt.edu/~shipman/soft/pylxml/web/Element-getchildren.html >>> xml = ''' ... ''' >>> pen = etree.fromstring(xml) >>> penContents = pen.getchildren() >>> for content in penContents: ... print "%-10s %3s" % (content.tag, content.get("n"