Re: ElementTree find with xmlns

2007-10-12 Thread cakebread
On Oct 12, 8:35 pm, Rajarshi <[EMAIL PROTECTED]> wrote: > > You have to prefix the element name with its namespace. The following > will work > > >>> tree.find('{http://www.w3.org/1999/xhtml}body') > > http://www.w3.org/1999/xhtml}body at 779d28> > Pefect, thank you, Rajarshi! -- http://mail.py

Re: ElementTree find with xmlns

2007-10-12 Thread Rajarshi
On Oct 12, 11:19 pm, cakebread <[EMAIL PROTECTED]> wrote: > I'm having problems parsing a file: > > >>> tree = ElementTree.fromstring(""" >>> xmlns="http://www.w3.org/1999/xhtml"; > >>> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; > >>> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema

ElementTree find with xmlns

2007-10-12 Thread cakebread
I'm having problems parsing a file: >>> tree = ElementTree.fromstring("""http://www.w3.org/1999/xhtml"; >>> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; >>> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"; >>> xmlns:dc="http://purl.org/dc/elements/1.1/"; >>> xmlns:foaf="http://x