This element enables the designer to include XML files that contain skin code into another SKIN file, to reuse existing code in another file.
Warning: cycles are not allowed for includes. Do not include a file that directly or indirectly includes the same file. To avoid cycles, it is possible to use the INCLUDE_ONCE element instead
None.
Name | Value Type | Default Value | Description | Comment | V. | Exp. |
---|---|---|---|---|---|---|
file |
Valid file path to XML file |
empty |
Path to the XML file to include. |
The file to include has to be a valid XML file with a single root element. |
1.0 |
No |
content |
Valid XML content |
empty |
XML content to include. |
Can be used to include generated XML content from build time variables. Overrides the file attribute when present.NOT available for INCLUDE_ONCE directive. |
2.6 |
No |
ignore_missing |
false |
When set to true, no error is thrown if the file is missing. |
Beware that this may cause errors that may be difficult to catch (missing objects...) if not used with care. |
2.6 |
No |
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#ffffff" repeat="true" h_margin="10" layout_type="row"> <INCLUDE file="include.xml" /> </SKIN>
if the include.xml file contains the following lines:
<?xml version="1.0" encoding="utf-8" ?> <IMAGE_PARAM_KNOB param_id="dsp.input4" image="knob_black.bmp" image_orientation="horizontal" images_count="127" />
Will be equivalent to the following file:
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#ffffff" repeat="true" h_margin="10" layout_type="row"> <IMAGE_PARAM_KNOB param_id="dsp.input4" image="knob_black.bmp" image_orientation="horizontal" images_count="127" /> </SKIN>
Just as if the code below the class="sourcecode"><?xml version="1.0" encoding="utf-8" ?> line had been pasted inside the including file.
Note that the included file has to be a valid XML file: the first line is mandatory, and the file must have a root element. If you want to include a file containing several elements in a list, they have to be enclosed in a root element. The DUMMY element can be used for this purpose.