[lxml-dev] Strange ValueError

Stefan Behnel stefan_ml at behnel.de
Mon Dec 15 11:30:52 CET 2008


[replying to all...]

pythonalex at email.it wrote:
>     e = SubElement( e_octapy, sub_elem )
>
> The problem is that the latest version of lxml does not accept that
> sub_elem contains ':' .

You have to provide the namespace URI instead of the prefix.

http://codespeak.net/lxml/tutorial.html#namespaces


> The previous version of lxml (lxml 2.1) whit the same code gave no
> problems.

I doubt that. Tag validation has been in there for a while.

Stefan



More information about the lxml-dev mailing list