Re: lxml question -- creating an etree.Element attribute with ':' in the name

2019-12-03 Thread Karsten Hilbert
On Mon, Dec 02, 2019 at 08:58:11PM -0800, gerem...@gmail.com wrote: > Date: Mon, 2 Dec 2019 20:58:11 -0800 (PST) > From: gerem...@gmail.com > To: python-list@python.org > Subject: Re: lxml question -- creating an etree.Element attribute with ':' > in the name > User

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2019-12-03 Thread geremy85
Theanks a lot -- https://mail.python.org/mailman/listinfo/python-list

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2013-09-19 Thread Stefan Behnel
Burak Arslan, 18.09.2013 21:35: > On 09/18/13 21:59, Roy Smith wrote: >> I can create an Element with a 'foo' attribute by doing: >> >> etree.Element('my_node_name', foo="spam") >> >> But, how do I handle something like: >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";, since "xmlns:xsi

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2013-09-18 Thread dieter
Roy Smith writes: > But, how do I handle something like: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";, since "xmlns:xsi" > isn't a valid python identifier? Read about "lxml"'s "namespace" support. -- https://mail.python.org/mailman/listinfo/python-list

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2013-09-18 Thread Burak Arslan
On 09/18/13 21:59, Roy Smith wrote: > I can create an Element with a 'foo' attribute by doing: > > etree.Element('my_node_name', foo="spam") > > But, how do I handle something like: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";, since "xmlns:xsi" > isn't a valid python identifier? > >

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2013-09-18 Thread Zachary Ware
On Wed, Sep 18, 2013 at 1:59 PM, Roy Smith wrote: > I can create an Element with a 'foo' attribute by doing: > > etree.Element('my_node_name', foo="spam") > > But, how do I handle something like: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";, since "xmlns:xsi" > isn't a valid python

lxml question -- creating an etree.Element attribute with ':' in the name

2013-09-18 Thread Roy Smith
I can create an Element with a 'foo' attribute by doing: etree.Element('my_node_name', foo="spam") But, how do I handle something like: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";, since "xmlns:xsi" isn't a valid python identifier? --- Roy Smith r...@panix.com -- https://mail.py

Re: lxml question

2009-09-10 Thread Diez B. Roggisch
mattia wrote: > I would like to click on an image in a web page that I retrieve using > urllib in order to trigger an event. > Here is the piece of code with the image that I want to click: > onclick="return checkPhoneField(document.contactFrm, 'mobile');" > alt="sms" src="images/button_sms.bmp"

Re: lxml question

2009-09-09 Thread Chris Rebert
On Wed, Sep 9, 2009 at 4:11 PM, mattia wrote: > I would like to click on an image in a web page that I retrieve using > urllib in order to trigger an event. > Here is the piece of code with the image that I want to click: > onclick="return checkPhoneField(document.contactFrm, 'mobile');" > alt="sm

lxml question

2009-09-09 Thread mattia
I would like to click on an image in a web page that I retrieve using urllib in order to trigger an event. Here is the piece of code with the image that I want to click: I don't know how to do it (I'm trying using lxml, but any suggestion can help). Thanks, Mattia -- http://mail.python.org/

Re: lxml question

2008-10-03 Thread Stefan Behnel
Uwe Schmitt wrote: > I have to parse some text which pretends to be XML. lxml does not want > to parse it, because it lacks a root element. > I think that this situation is not unusual, so: is there a way to > force lxml to parse it ? > > My work around is wrapping the text with "..." before > fee

Re: lxml question

2008-09-26 Thread alex23
On Sep 27, 1:19 am, Uwe Schmitt <[EMAIL PROTECTED]> wrote: > I have to parse some text which pretends to be XML. lxml does not want > to parse it, because it lacks a root element. Another option is BeautifulSoup, which handles badly formed XML really well: http://www.crummy.com/software/Beautiful

Re: lxml question

2008-09-26 Thread Mark Thomas
On Sep 26, 11:19 am, Uwe Schmitt <[EMAIL PROTECTED]> wrote: > I have to parse some text which pretends to be XML. lxml does not want > to parse it, because it lacks a root element. > I think that this situation is not unusual, so: is there a way to > force lxml to parse it ? By "pretends to be XML

lxml question

2008-09-26 Thread Uwe Schmitt
Hi, I have to parse some text which pretends to be XML. lxml does not want to parse it, because it lacks a root element. I think that this situation is not unusual, so: is there a way to force lxml to parse it ? My work around is wrapping the text with "..." before feeding lxmls parser. Greeting