Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34674
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-12-11 18:19 -0800 |
| References | <7caeb6db-41f9-4321-b172-f8ddb6a9ac6d@googlegroups.com> <mailman.740.1355256000.29569.python-list@python.org> |
| Subject | Re: Create xml with elementtree ET and xml escaping |
| From | nenad.cikic@gmail.com |
| Message-ID | <mailman.763.1355278772.29569.python-list@python.org> (permalink) |
Il giorno martedì 11 dicembre 2012 20:59:54 UTC+1, MRAB ha scritto: > > Hello, I have posted the same in XML group but it seems pretty dead there so I will repost here. > > > > > > I am new to xml processing in python. > > > I am looking to create XML. Xml is not too difficult so I thought to create it manually using ElementTree. > > > First I noted that ET.toString does escape <>& but not " and ' > > > Is that normal? > > > > > " needs to be encoded when it's in an attribute's value: > > > > <tag value="a quote (")"> OK I understood. > > > because it's also being used as a delimiter in that case, but elsewhere > > it has no special meaning. > > > > > Since I have also the need to sign the XML I need the ability to create xml but without xml escaping (unescaped data are signed). > > > > XML with the escaping isn't valid XML. > Of course I know it is not valid without escaping. But I need it only for signing. I will recheck this if really the web service wants the data to be signed as non escaped. Thanks Nenad
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Create xml with elementtree ET and xml escaping nenad.cikic@gmail.com - 2012-12-11 09:47 -0800
Re: Create xml with elementtree ET and xml escaping MRAB <python@mrabarnett.plus.com> - 2012-12-11 19:59 +0000
Re: Create xml with elementtree ET and xml escaping nenad.cikic@gmail.com - 2012-12-11 18:19 -0800
Re: Create xml with elementtree ET and xml escaping Stefan Behnel <stefan_ml@behnel.de> - 2012-12-15 10:31 +0100
Re: Create xml with elementtree ET and xml escaping nenad.cikic@gmail.com - 2012-12-11 18:19 -0800
csiph-web