2.2. Format

The XML configuration format provides a consistent file structure, which is easier to learn and remember when attempting to configure a new system.

Using XML, you can eliminate (nearly) all of the configuration file parsing and error handling - an external XML parser can do that instead - (especially if it is a validating parser). To make sure the control file is well-formatted and that the syntax is valid, you can run the control file through a validating parser before it is actually used for automatic installation. This is especially required if you prefer to edit the profile manually.

The following example shows a control file in XML format:

Example 2-1. XML Control File (Profile)

<?xml version="1.0"?>
<!DOCTYPE profile SYSTEM
 "/usr/share/YaST2/include/autoinstall/profile.dtd">
 <profile
 xmlns="http://www.suse.de/1.0/yast2ns"
 xmlns:config="http://www.suse.de/1.0/configns">
 <install>
   <partitioning  config:type="list">
      <drive>
         <device>/dev/hda</device>
        <partitions config:type="list">
         <partition>
            <filesystem  config:type="symbol">ext2</filesystem>
            <size>520Mb</size>
            <mount>/</mount>
         </partition>
         <partition>
            <filesystem config:type="symbol">reiser</filesystem>
            <size>1200Mb</size>
            <mount>/data</mount>
         </partition>
        </partitions>
      </drive>
   </partitioning>
 </install>
 <configure>  
   <scripts>
    <pre-scripts>
     <script> 
        <interpreter>shell</interpreter>
	<filename>start.sh</filename>
         <source>

            <![CDATA[
		#!/bin/sh 
		echo "Starting installation" 
		exit 0
           ]]>

         </source>
     </script>  
    </pre-scripts>
   </scripts>
 </configure>
</profile>