Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10382 > unrolled thread
| Started by | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| First post | 2011-07-27 13:42 +0200 |
| Last post | 2011-07-27 13:42 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: can I use element tree for handling special characters in xml text? Stefan Behnel <stefan_ml@behnel.de> - 2011-07-27 13:42 +0200
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Date | 2011-07-27 13:42 +0200 |
| Subject | Re: can I use element tree for handling special characters in xml text? |
| Message-ID | <mailman.1534.1311766993.1164.python-list@python.org> |
hackingKK, 27.07.2011 13:16: > I have been waiting a lot to ask this question and I did ask some days back > but probably could not put it the proper way. I assume you missed the answer you got? > I want to know how I can safely include special characters like & or > in > xml text? > For example I store a small xml file containing list of organisations. > Many names have an "&" in the name as in brian & turner. > so the xml noad will be <orgname> brian & turner </orgname> > But I know this won't work directly. Yes it does. There's nothing you have to do, just put in the text and ElementTree will handle it. > my code naturally fails when I try to insert such data. You may want to show us your code then. Please provide a code snippet that shows the problem and present the output you get as well as the output you expected. Stefan
Back to top | Article view | comp.lang.python
csiph-web