It is very easy to achieve this using a regex expression. Suppose we have below in an xml file and we want to replace the space inside DisplayName node with underscore.
Sample xml –
<User id="11068577">
<UserId>11068577</UserId>
<DisplayName>Dolcese Vita</DisplayName>
<Address>Texas, US</Address>
</User>
- Open Notepad++
- Click Ctrl+H to open replace dialog box
- Add below in Find What:
(?i)(<DisplayName>.*?)[\s](?=.*</DisplayName>)
4. Add below in Replace with:
\1_\2
5. Result –
<User id="11068577">
<UserId>11068577</UserId>
<DisplayName>Dolcese_Vita</DisplayName>
<Address>Texas, US</Address>
</User>
Interested in Cryptocurrency. Register and start investing here
Earn a side income by affiliate marketing. Learn here how to do it.