Basically i've got a huge xml document & a list of about 100 find/replace stings to apply to the document. unfortunately, it needs to be done once every few days to recreate a database schema & i just cant find any decent way to massively find & replace stuff. I use Notepad ++ for all my other text 'needs' and figured someone here may have seen this issue before.
sed is in the GnuWinUtil32 port collection. awk was also ported as gawk.exe, and there is an awk Notepad++ ANSI plugin - not sure it is being maintained any longer though.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any thoughts on how to do a massive find/replace?
Basically i've got a huge xml document & a list of about 100 find/replace stings to apply to the document. unfortunately, it needs to be done once every few days to recreate a database schema & i just cant find any decent way to massively find & replace stuff. I use Notepad ++ for all my other text 'needs' and figured someone here may have seen this issue before.
Any thoughts? here's an example
find:
<field name="ABSOLUTEDISTANCE" aliasName="AbsoluteDistance" esriFieldType="3" length="8" precision="0" required="False" scale="0" domainFixed="False" editable="True" isNullable="True" modelName="AbsoluteDistance"/>
replace with:
<field name="ABSOLUTEDISTANCE" aliasName="AbsoluteDistance" esriFieldType="3" length="8" precision="15" required="False" scale="2" domainFixed="False" editable="True" isNullable="True" modelName="AbsoluteDistance"/>
You might want to look into a scripting language like perl or python. Or maybe use something like awk/sed if you have access to a linux box.
sed is in the GnuWinUtil32 port collection. awk was also ported as gawk.exe, and there is an awk Notepad++ ANSI plugin - not sure it is being maintained any longer though.
CChris