If you have a correct XML document. In practice this is rather a big IF. Andreas
Am Montag, den 21.04.2008, 10:35 -0700 schrieb Jeff Younker: > On Apr 21, 2008, at 6:40 AM, Stephen Nelson-Smith wrote: > > > On 4/21/08, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: > > I want to stick with standard library. > > > > How do you capture <dt> elements? > > > from xml.etree import ElementTree > > document = """ > <html> > <head> > <title>foo and bar</title> > </head> > <body> > <dt>foo</dt> > <dt>bar</dt> > </body> > </html> > """ > > dt_elements = ElementTree.XML(document).findall('dt') > > -jeff
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor