XmlTools/Full documentation: Difference between revisions
< XmlTools
Jump to navigation
Jump to search
Script 10k (talk | contribs) |
Script 10k (talk | contribs) m (→Examples) |
||
Line 29: | Line 29: | ||
<pre>XmlTools --add-values --new-val "Unkillable NonCombatant" --xpath-expression "/Oni/Objects/CHAR[@Id='3926']/OSD/Flags" --files "BINACJBOCharacter.xml"</pre> | <pre>XmlTools --add-values --new-val "Unkillable NonCombatant" --xpath-expression "/Oni/Objects/CHAR[@Id='3926']/OSD/Flags" --files "BINACJBOCharacter.xml"</pre> | ||
Original: | {| style="margin: 1em auto 1em auto;" <!-- Centers table --> | ||
! style="width: 50%;" | Original | |||
! style="width: 50%;" | Modified | |||
|- | |||
| | |||
<Oni> | <Oni> | ||
<Objects> | <Objects> | ||
Line 50: | Line 53: | ||
</Objects> | </Objects> | ||
</Oni> | </Oni> | ||
| | |||
<Oni> | <Oni> | ||
<Objects> | <Objects> | ||
Line 72: | Line 73: | ||
</Objects> | </Objects> | ||
</Oni> | </Oni> | ||
|} | |||
==--remove-values== | ==--remove-values== |
Revision as of 02:56, 8 February 2014
WARNING
THIS PAGE IS CURRENTLY BEING UPDATED TO THE NEW VERSION OF XMLTOOLS.
PLEASE WAIT UNTIL IS FINISHED BEFORE USING ITS DOCUMENTATION.
Overview
This page describes all XmlTools options with examples. It is needed to avoid too much content in the XmlTools main page.
Command-line operations
Overview
--add-values
Description
This operation allows you to add new XML values to existing XML elements. The values should be space separated and contained within quotes.
Usage: XmlTools --add-values --new-val "new values"
Examples
Let's say you want to add the Unkillable and the NonCombatant flag to A_L18 character.
XmlTools command:
XmlTools --add-values --new-val "Unkillable NonCombatant" --xpath-expression "/Oni/Objects/CHAR[@Id='3926']/OSD/Flags" --files "BINACJBOCharacter.xml"
Original | Modified |
---|---|
<Oni> <Objects> <CHAR Id="3926"> <Header> <Flags /> <Position>-37.3426628 756 -491.6369</Position> <Rotation>0 221.15564 0</Rotation> </Header> <OSD> <Flags>NotInitiallyPresent</Flags> <Class>TCTF_lite_1</Class> <Name>A_L18</Name> <Weapon>w8_mbo w1_tap</Weapon> ... </OSD> </CHAR> ... </Objects> </Oni> |
<Oni>
<Objects>
<CHAR Id="3926">
<Header>
<Flags />
<Position>-37.3426628 756 -491.6369</Position>
<Rotation>0 221.15564 0</Rotation>
</Header>
<OSD>
<Flags>NotInitiallyPresent Unkillable NonCombatant</Flags>
<Class>TCTF_lite_1</Class>
<Name>A_L18</Name>
<Weapon>w8_mbo w1_tap</Weapon>
...
</OSD>
</CHAR>
...
</Objects>
</Oni>
|