How to use oiv package to replace xml text without replacing the file
-
Hi all,
Basically, I want to create a "patch" for a file, to replace some lines without replacing the entire file.
Like this I dont need to worry about any previously installed mods. It will just work
I want to overwritte every lines who contains <lens_artefacts_intensity></lens_artefacts_intensity> in one specific file.I have tried the following :
<xml path="common/data/timecycle/timecycle_mods_4.xml"><replace xpath='//lens_artefacts_intensity'><lens_artefacts_intensity>0.000</lens_artefacts_intensity></replace></xml>But it doesnt work properly, it only replaces the first matching line but not the following ones.
So I end up writting this:
<xml path="common/data/timecycle/timecycle_mods_4.xml"><replace xpath='//modifier[@name="MichaelsDarkroom"]/lens_artefacts_intensity'><lens_artefacts_intensity>0.000</lens_artefacts_intensity></replace></xml>
<xml path="common/data/timecycle/timecycle_mods_4.xml"><replace xpath='//modifier[@name="exile1_plane"]/lens_artefacts_intensity'><lens_artefacts_intensity>0.000</lens_artefacts_intensity></replace></xml>
<xml path="common/data/timecycle/timecycle_mods_4.xml"><replace xpath='//modifier[@name="player_transition"]/lens_artefacts_intensity'><lens_artefacts_intensity>0.000</lens_artefacts_intensity></replace></xml>
<xml path="common/data/timecycle/timecycle_mods_4.xml"><replace xpath='//modifier[@name="BloomMid"]/lens_artefacts_intensity'><lens_artefacts_intensity>0.000</lens_artefacts_intensity></replace></xml>
<xml path="common/data/timecycle/timecycle_mods_4.xml"><replace xpath='//modifier[@name="CHOP"]/lens_artefacts_intensity'><lens_artefacts_intensity>0.000</lens_artefacts_intensity></replace></xml>
[.......more......]This works
But I was wondering if there is a Better way (shorter way) of doing this ??