Export an XML Set from a Settings File on Windows
The CATBatGenXMLSet command reads any setting file and to generate an XML file from it.
The parameters are:
Parameter | Description |
---|---|
Output_directory | Name of the directory where the XML file will be created: (%USERPROFILE%\AppData\Local\Temp). Example: C:\Users\user_name\AppData\Local\Temp. |
SettingName | Name of the CATSettings file (without the
.CATSettingsextension) that you want to export to XML format. Example: Statistics. |
mode | Optional argument. Specify:
-admin in order to run the command in administrator mode, which has the effect of creating the resulting file in the administrator settings environment. The default mode is user mode. No extension. If you want to understand what administrator mode is and what it is used for, refer to Configuring Settings in File-Based Settings Mode and Locking or Modifying Settings. General information about settings is provided in About Settings |
The name of the resulting file is SettingName.xml.
ExampleCATBatGenXMLSet C:\Users\user_name\AppData\Local\Temp CATStatistics
Example of OutputLet's say we have a settings file named Example.CATSettings comprising the following attributes:
Length of type float explicitly set to 17.132 Weight of type long not explicitly set (code default) Number of type integer explicitly set to [1,2,3]
The resulting XML file will be as follows:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE CATSettingRepository [ <!ELEMENT CATSettingRepository (Attribute*)> <!ATTLIST CATSettingRepository Name NMTOKEN #REQUIRED> <!ELEMENT Attribute (Value*)> <!ATTLIST Attribute Name NMTOKEN #REQUIRED Type CDATA #REQUIRED Size NMTOKEN #REQUIRED Lock (Locked|JustLocked|Unlocked) "Unlocked"> <!ELEMENT Value (#PCDATA)> ]> <CATSettingRepository Name="Example"> <Attribute Name="Length" Type="float" Size="1"> <Value>17.132</Value> </Attribute> <Attribute Name="Weight" Type="long" Size="0"> </Attribute> <Attribute Name="Number" Type="int" Size="3"> <Value>1</Value> <Value>2</Value> <Value>3</Value> </Attribute> </CATSettingRepository>
Note that a size of 0 means that the attribute has not been explicitly modified anywhere in the concatenation. Its value is also the default value of the code.