I have following XML tags in a large number.
<SERVICE>
<NAME>
sh_SEET15002GetReKeyDetails
</NAME>
<ID>642</ID>
</SERVICE>
I want to get this formatted in the following manner. I have tried using xmllint but it is not working for me. Please provide help.
<SERVICE>
<NAME>sh_SEET15002GetReKeyDetails</NAME>
<ID>642</ID>
</SERVICE>
Without programming you can use
Eclipse XML Source Editor
. Have a look at this answerBy the way have you tried
xmllint -format -recover nonformatted.xml > formated.xml
?EDIT:
You can try this XMLStarlet Command Line XML Toolkit.