Configuring the XML Optimizer Plugin Configuration File

The following page helps you configure the XML file to provide to the Speos Optimization feature that will give the information on which optimization plugin to use.

Optimization Feature Definition

The XML configuration file is to be provided in the Plugin configuration field of the Optimization feature definition.



XML File Format

<OptimizerPluginConfig>
    <!-- the path to the dll file -->
    <PluginPath>[path to you dll]/OptimPluginSample.dll</PluginPath>
    <!-- the name of the class that you created, including namespace -->
    <PluginClass>OptimPluginSample.PluginSample</PluginClass>
    <!-- the string that will be passed to your class constructor -->
    <Arguments>4.2,3</Arguments>
</OptimizerPluginConfig>
  • The PluginPath corresponds to the full path to your *.dll file.
  • The PluginClass corresponds to the full name of the class, including the namespace: [namespace].[class name]
  • The Arguments correspond to the string that is passed to the constructor of your class.

    Arguments can input other formats that you want to read. For more information, refer to the Arguments section below.

Arguments

CSV Data

As in the plugin example, you can use CSV line data:

<OptimizerPluginConfig>
    <PluginPath>...</PluginPath>
    <PluginClass>...</PluginClass>
    <Arguments>value1,value2,value3</Arguments>
</OptimizerPluginConfig>

XML String

If you want to have a XML string as input, you must integrate it inside a CDATA tag:

<OptimizerPluginConfig>
    <PluginPath>...</PluginPath>
    <PluginClass>...</PluginClass>
    <Arguments><![CDATA[<test><test2>value<test2/><test3>other value<test3/><test/>]]></Arguments>
</OptimizerPluginConfig>

JSON

You can apply JSON:

<OptimizerPluginConfig>
    <PluginPath>...</PluginPath>
    <PluginClass>...</PluginClass>
    <Arguments>{"test2": "value", "test3": "other value"}</Arguments>
</OptimizerPluginConfig>