Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54392 > unrolled thread
| Started by | Roy Smith <roy@panix.com> |
|---|---|
| First post | 2013-09-18 14:59 -0400 |
| Last post | 2013-09-18 14:59 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
lxml question -- creating an etree.Element attribute with ':' in the name Roy Smith <roy@panix.com> - 2013-09-18 14:59 -0400
| 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 |
| Message-ID | <mailman.128.1379530768.18130.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web