I would like to remove spaces and quotes from the value of XML tag
<ns:tag2> in my XML file on Linux(spaces to be removed only for this tag not other places).
Sample XML content looks like below.
<ns:tag1> <ns:tag2>Abcdef qwert/denn+hkg kmknn xyz""""""""""</ns:tag2> </ns:tag1>
But I need the file to be written as shown below.
<ns:tag1> <ns:tag2>Abcdefqwert/denn+hkgkmknnxyz</ns:tag2> </ns:tag1>
I have seen the solution at Remove string with spaces and quotes from xml file and tried using sed command to remove the quotes but no luck.
sed 's/ ""//g' temp.xml
Please suggest me right syntax for the same. It is fine if we can do this in 2 different steps.