I have a file that contains multiple lines of xml. I would like to replace certain parts of the file. Some parts of the file contains quotation marks (") which I would like to replace. I have been trying to escape the quotation mark with \, but I don't think this is working based on the result of my file.
Here is an example of one of my sed commands:
sed -e "s/\"text\"/'text'/ig" file.xml > temp.tmp
Is this how you escape quotation marks in a sed command or am I doing something wrong?

"text"with'text'. Of course it won't do anything to"othertext". Show a few input lines, the corresponding undesired output, and explain what output you want instead. – Gilles Mar 20 '11 at 19:11\"is the correct way of escaping quotation marks in sed command? – Treebranch Mar 20 '11 at 19:15". But your shell command uses a double-quoted string, and\"is correct there. Thesedprogram seess/"text"/'text'/igas the argument to-e. – Gilles Mar 20 '11 at 19:20s/\"text\" /'text'/igWould it find only"text"with the space after it? – Treebranch Mar 20 '11 at 19:24sedis the right tool for the job, maybe you want an XML parser. – Gilles Mar 20 '11 at 19:28