Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9538 > unrolled thread

how to get Python to insert special characters in an xml file?

Started byhackingKK <hackingkk@gmail.com>
First post2011-07-15 17:23 +0530
Last post2011-07-15 17:23 +0530
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  how to get Python to insert special characters in an xml file? hackingKK <hackingkk@gmail.com> - 2011-07-15 17:23 +0530

#9538 — how to get Python to insert special characters in an xml file?

FromhackingKK <hackingkk@gmail.com>
Date2011-07-15 17:23 +0530
Subjecthow to get Python to insert special characters in an xml file?
Message-ID<mailman.1061.1310730808.1164.python-list@python.org>
Hello all.
I am currently developing a python application which reads and writes 
some data to an xml file.
I use the elementTree library for doing this.
My simple question is that if I have some thing like & as in "kk & 
company " as organisation name, how can I have Python take this as a 
litteral string including the & sign and put in the <orgname> </orgname> 
tag?
Even same applies while reading the file.  I would like to have the & 
come as a part of the literal string.
Happy hacking.
Krishnakant.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web