I have the following file log.xml:
<entry>
<message>Line 1
Line 2 and so on</message>
</entry>
On CentOS 5.4 using xmlstarlet 1.0.1 if I run the following command, while removing linefeed in message:
xml sel -t -m //entry -v "translate(message,'
' ,'@')" log.xml
The result is:
Line 1@ Line 2 and so on
On CentOS 6 using xmlstarlet:
1.3.1
compiled against libxml2 2.7.6, linked with 20706
compiled against libxslt 1.1.26, linked with 10126
I'll receive:
Line 1
Line 2 nd so on
Note "and" converted to nothing. I suppose it's not problem of xmlstarlet, but rather some change in libxslt.
Any ideas how to fix it?
UPDATE
Added problem with transform of letter "a" to nothing.