Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54392
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2013-09-18 14:59 -0400 |
| Subject | lxml question -- creating an etree.Element attribute with ':' in the name |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.128.1379530768.18130.python-list@python.org> (permalink) |
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
roy@panix.com
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
lxml question -- creating an etree.Element attribute with ':' in the name Roy Smith <roy@panix.com> - 2013-09-18 14:59 -0400
csiph-web