489
edits
Script 10k (talk | contribs) |
Script 10k (talk | contribs) |
||
Line 202: | Line 202: | ||
===Description=== | ===Description=== | ||
This operation allows you to replace all the XML values from existing XML elements. The new values should be space separated and contained within quotes. | |||
<tt>Usage: XmlTools --replace-all-values --new-val "new values"</tt> | |||
===Example=== | ===Example=== | ||
Let's say you want to replace all the flags in all characters by InfiniteAmmo and NotInitiallyPresent flags. | |||
'''XmlTools command:''' | |||
<pre>XmlTools --replace-all-values --new-val "NotInitiallyPresent InfiniteAmmo" --element-name "Flags" --parent-element-name "OSD" --files "BINACJBOCharacter.xml"</pre> | |||
{| style="margin: 1em auto 1em auto;" <!-- Centers table --> | |||
! style="width: 50%;" | XML Original | |||
! style="width: 50%;" | XML After Command | |||
|- | |||
| | |||
<Oni> | |||
<Objects> | |||
<CHAR Id="7643"> | |||
<Header> | |||
<Flags /> | |||
<Position>173.626175 0 36.94594</Position> | |||
<Rotation>0 134.847549 0</Rotation> | |||
</Header> | |||
<OSD> | |||
<Flags><span style="color:blue">NoAutoDrop UpgradeDifficulty CanSpawnMultiple</span></Flags> | |||
<ClassTCTF_swat_1</Class> | |||
<Name>D_S82</Name> | |||
<Weapon>w3_phr</Weapon> | |||
... | |||
</OSD> | |||
</CHAR> | |||
... | |||
</Objects> | |||
</Oni> | |||
| | |||
<Oni> | |||
<Objects> | |||
<CHAR Id="7643"> | |||
<Header> | |||
<Flags /> | |||
<Position>173.626175 0 36.94594</Position> | |||
<Rotation>0 134.847549 0</Rotation> | |||
</Header> | |||
<OSD> | |||
<Flags><span style="color:red">NotInitiallyPresent InfiniteAmmo</span></Flags> | |||
<ClassTCTF_swat_1</Class> | |||
<Name>D_S82</Name> | |||
<Weapon>w3_phr</Weapon> | |||
... | |||
</OSD> | |||
</CHAR> | |||
... | |||
</Objects> | |||
</Oni> | |||
|} | |||
==--update-elements== | ==--update-elements== |
edits