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

Discussion in 'Python' started by hackingKK, Jul 15, 2011.

  1. hackingKK

    hackingKK Guest

    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.
    hackingKK, Jul 15, 2011
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Mueller
    Replies:
    3
    Views:
    32,931
    Stefan Mueller
    Jul 23, 2006
  2. jkflens
    Replies:
    2
    Views:
    1,437
    jkflens
    May 30, 2006
  3. Replies:
    2
    Views:
    1,066
    Ingo Menger
    May 31, 2007
  4. rvino
    Replies:
    0
    Views:
    4,629
    rvino
    Aug 14, 2007
  5. majna
    Replies:
    4
    Views:
    632
    Thomas 'PointedEars' Lahn
    Sep 19, 2007
Loading...

Share This Page