Jump to content

XmlTools: Difference between revisions

43 bytes added ,  2 February 2014
Line 26: Line 26:


==Syntax==
==Syntax==
The following actions are listed when calling XmlTools with no options passed in. You can get the version with the argument "version". The commands below must be preceded by either <tt>xmlTools.exe</tt> (Windows) or <tt>mono xmlTools.exe</tt> (Mac). If xmlTools.exe is not in the current folder, you can provide the full/relative path to it or set the path variable. On the Mac, be sure to use <tt>/</tt> rather than <tt>\</tt> in paths. The following instructions are for Windows by default.
The following options are listed when calling XmlTools with no options passed in. You can get the version with the option "--version". The commands below must be preceded by either <tt>XmlTools.exe</tt> (Windows) or <tt>./XmlTools</tt> (Mac). If XmlTools is not in the current folder, you can provide the full/relative path to it or set the path variable. On the Mac, be sure to use <tt>/</tt> rather than <tt>\</tt> in paths.


The basic syntax is:
The basic syntax is:
{|
{|
|-
|-
|'''Windows'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">xmlTools.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">addvalue</span> <span style="background:rgb(255,156,156); border-radius:0.33em;">-value:"DropWeapon"</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">-element:Flags</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">-filename:TRAMSTRCOMhit_fallen1.xml</span></tt>
|'''Windows'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">XmlTools.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--add-values</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--element-name</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">"Weapon"</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--new-val</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">"w1_tap"</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--files</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">"BINACJBOCharacter.xml"</span></tt>
|-
|-
|'''Mac'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">mono xmlTools.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">addvalue</span> <span style="background:rgb(255,156,156); border-radius:0.33em;">-value:"DropWeapon"</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">-element:Flags</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">-filename:TRAMSTRCOMhit_fallen1.xml</span></tt>
|'''Mac'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">./XmlTools</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--add-values</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--element-name</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">"Weapon"</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--new-val</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">"w1_tap"</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">--files</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">"BINACJBOCharacter.xml"</span></tt>
|}
|}


Line 41: Line 41:
|- valign="top"
|- valign="top"
|<span style="background:rgb(235,235,235); border-radius:0.33em;">'''Invocation'''</span>
|<span style="background:rgb(235,235,235); border-radius:0.33em;">'''Invocation'''</span>
|Windows can refer to the program directly, but Macs use Mono to run the .NET app; note also that if xmlTools.exe is not in the Command Prompt/Terminal's current directory, you must provide the full path to it or set the path variable.
|Note that if XmlTools is not in the Command Prompt/Terminal's current directory, you must provide the full path to it or set the path variable.
|-
|-
|<span style="background:rgb(175,175,255); border-radius:0.33em;">'''Operation'''</span>||The command to perform. Note that commands are <u>not</u> prefaced by a <tt>-</tt>, whereas the arguments supplied after the commands <u>are</u>.
|<span style="background:rgb(175,175,255); border-radius:0.33em;">'''Operation'''</span>||The command to perform. Note the commands are prefaced by a <tt>--</tt>, some commands have a short version which is prefaced by a single <tt>-</tt> followed by a letter.
|- valign="top"
|-
|<span style="background:rgb(255,156,156); border-radius:0.33em;">'''Operation-specific argument(s)'''</span>||This is where you supply the arguments that this specific command needs. As seen below, addvalue requires the value to add to a space-separated list, so we provide that here. Note the use of quotes as specified in the command's documentation below.
|<span style="background:rgb(156,255,156); border-radius:0.33em;">'''Operation Value'''</span>||This is where you supply the value that this specific command needs. As seen below, --element-name requires the XML element name, so we provide that here. Quotes should be used when the value has spaces or to avoid [http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html Unix shell expansion].
|- valign="top"
|- valign="top"
|<span style="background:rgb(156,255,156); border-radius:0.33em;">'''Global argument(s)'''</span>||Make sure you specify the full path to the file if the file is not in the current directory. No quotes are used for these commands unless you need to pass a file name path with spaces in it.
|}
|}


489

edits