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

H

hackingKK

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top