I wrote a quite simple bash script as :
#!/bin/bash
nLine=$(awk '/text_to_parse/{ print NR; exit }' testFile.xml)
echo "LINE = $nLine"
sed -e "${nLine}s/.*/new text/" < testFile.xml
echo
cat testFile.xml
exit 0
the execution returns :
LINE = 8
<Test>
<Name>First Test</Name>
<Version>1.0</Version>
<Command>new text</Command>
</Test>
<Test>
<Name>First Test</Name>
<Version>1.0</Version>
<Command>text_to_parse</Command>
</Test>
The modification is never applied. The file can be modified ..
-rwxrwxrwx 1 root root 290 Jan 1 00:23 testFile.xml