Free translation of a document from Adobe Live Docs -
Configuration file syntaxThis document describes the syntax of the configuration file (flex-config.xml)
In the configuration file, values are stored as XML blocks that follow a specific syntax. Mostly tags repeat command line parameters.
Root tag')
The default root tag is conf. The flex-config.xml file is <flex-config>. If you create your own configuration file, it must also have a root tag.
All configuration files must have an <flex-config> XML declaring tag and a </ flex-config> closing tag, as shown in the following example:
<?xml version="1.0"?> <flex-config xmlns="http://www.adobe.com/2006/flex-config"> </flex-config>
You must close the <flex-config> tag just like any other xml tag.
The second tag in conf. file is a tag. This tag serves as a wrapper for compiler options. However, not all compiler options can be specified in this block of the configuration file.
Tags that you should use in the compiler block have the compiler prefix
(for example, compiler.services) . If dotted notation is not used
(for example, include-file), then such tags are indicated in the root tag conf. a file. And written as follows:
<compiler> ... </compiler> <include-file> <name>logo.gif</name> <path>c:/images/logo/logo1.gif</path> </include-file>
In some cases, parameters have many nested tags, such as the fonts, compiler.fonts.managers and compiler.fonts.languages.language parameters. Other parameters that also require the presence of parent tags when added to the configuration file are the frames.frame parameter and metadata parameters.
Next will be described methods for determining the syntax.
Getting the list of tags for the configuration fileUse the help parameter of the compiler command line to find out the syntax of compiler options for conf. file; For example:
mxmlc -help list advanced

The following is the entry for the source-path parameter:
-compiler.source-path [path-element][...]
This means that in the configuration file, you can use one or more <path-element> elements as child <source-path> tags and that <source-path> is a child tag. The following is an example of how this should look in the configuration file:
<compiler> <source-path> <path-element>.</path-element> <path-element>c:/myclasses/</path-element> </source-path> </compiler>
Definition of end nodesThe help command uses dot notation to separate the child tags from the parent tags; the rightmost entry corresponds to the target node. For example: -tag1.tag2 means that the child tag.
Angle brackets (<>) or square brackets ([]) around the parameter indicate whether the parameter is a leaf node or not.
Square brackets indicate that there may be a list of one or more values for a given parameter.
If the unique end node of the tag is enclosed in angle brackets, then in conf. the file does not need to specify parent tags.
For example, if help displays the following:
compiler.fonts.managers [manager-class][...]
Then, you can specify in the configuration file the value for the parameter, as shown below:
<compiler> <fonts> <managers> <manager-class>flash.fonts.JREFontManager</manager-class> </managers> </fonts> </compiler>
However, the <manager-class> node is unique, so you can set its value without defining the parent tags and, as shown in the following example:
<compiler> <manager-class>flash.fonts.JREFontManager</manager-class> </compiler>
If help displays several parameters in angle brackets, then you set the values for these parameters at the same level, relative to each other, and not as children. For example, for default-size (default-size), the default application size in conf. The file is set as follows:
<default-size> <height>height_value</height> <width>width_value</width> </default-size>
Use of markers (tokens)You can pass a token value to the compiler using the following syntax:
+token_name=value
In the configuration file, you refer to the value using the following syntax:
${token_name}
You can also use the
@Context
token in your conf. files to get the root context of your application. You can also use the $ {flexlib} token to get the frameworks directory (framework directory). This can also be useful if you create your own configuration and do not use the default library-path settings.
By default, the value of the mark $ {flexlib} is application_home \ frameworks
Add valuesIn conf. file you can specify the append attribute for any tag that accepts a list of arguments. Set this attribute to true to indicate that values should be added and not replace existing ones. The default is false.
Setting the append attribute to true allows you to combine the values of parameters from several configuration files at once.
(Ie, you specify several configuration files and their values for the parameters are not replaced, they are added)
The following example adds two values for the library-path parameter:
<library-path append="true"> <path-element>/mylibs</path-element> <path-element>/myotherlibs</path-element> </library-path>