####################
XML Batch Conversion
####################

HOOPS Converter can take commands from an XML file which allows for specifying multiple conversion cycles which will be executed in succession. Please refer to the list of :doc:`command line options </api_ref/data_import/converter-command-line-options>` which are available.


To perform a batch conversion, use the following command line: 

.. code-block:: none

	converter --input_xml_batch_file "sample_batch.xml"

Below is an example of an XML file that performs multiple conversions. 

.. code-block:: none

	<converter license="PutLicenseHere" output_directory="D:\myfiles\output">
		<input file="D:\myfiles\roller.jt">
			<output type="SC Model" file="roller" sc_export_assemblytree="true" />
			<output type="PDF" file="roller.pdf" background_color="0,0.5,0.2,0.1,0.2,0.3" />
		</input>

		<input file="D:\myfiles\micro engine.CATProduct">
			<output type="SC Model" file="microengine" />
		</input>
	</converter>


| ``converter``
| Root Element defining a conversion cycle. 
| **Allowed Attributes:**
| * *license* -  Package License Key                    
| * *output_directory* - Default directory for file export

| ``input``
| Defines a conversion cycle performed on a single CAD file
| **Allowed Attributes:**
| *file* - Location of input file.

| ``output``	
| Defines a single file export.
| **Allowed Attributes:**
| *file* - Location of output file.
| *type* - Type of output file. Supported types are: SC Model, XML, HSF, PDF, PRC, STL, XT, PNG, STEP, 3MF

The rest of the output attributes correspond to the command line export options. Please see the :doc:`command line page </api_ref/data_import/converter-command-line-options>` for more information.
