Index: export/views-bonus-export-xml.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_bonus/export/views-bonus-export-xml.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 views-bonus-export-xml.tpl.php
--- export/views-bonus-export-xml.tpl.php	24 Jun 2009 17:27:53 -0000	1.2
+++ export/views-bonus-export-xml.tpl.php	17 Jul 2010 17:15:10 -0000
@@ -19,7 +19,7 @@ print '<?xml version="1.0" encoding="UTF
 <?php foreach ($themed_rows as $count => $row): ?>
   <node>
 <?php foreach ($row as $field => $content):
-    $label = $header[$field] ? $header[$field] : $field;
+    $label = $header[$field] ? ($options['transform'] ? str_replace(' ', '-', $header[$field]) : $header[$field]) : $field;
 ?>
     <<?php print $label; ?>><?php print $content; ?></<?php print $label; ?>>
 <?php endforeach; ?>
Index: export/views_bonus_plugin_style_export_xml.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_bonus/export/views_bonus_plugin_style_export_xml.inc,v
retrieving revision 1.6
diff -u -p -r1.6 views_bonus_plugin_style_export_xml.inc
--- export/views_bonus_plugin_style_export_xml.inc	7 Jul 2009 07:59:40 -0000	1.6
+++ export/views_bonus_plugin_style_export_xml.inc	17 Jul 2010 17:15:10 -0000
@@ -23,5 +23,41 @@ class views_bonus_plugin_style_export_xm
     parent::init($view, $display, $options = NULL);
     $this->feed_image = drupal_get_path('module', 'views_bonus_export') . '/images/xml.png';
   }
-}
 
+  /**
+   * Set options fields and default values.
+   *
+   * @return
+   * An array of options information.
+   */
+  function option_definition() {
+    $options = parent::option_definition();
+
+    $options['transform'] = array(
+      'default' => TRUE,
+      'translatable' => TRUE,
+    );
+
+    return $options;
+  }
+
+  /**
+   * Options form mini callback.
+   *
+   * @param $form
+   * Form array to add additional fields to.
+   * @param $form_state
+   * State of the form.
+   * @return
+   * None.
+   */
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $form['transform'] = array(
+      '#type' => 'checkbox',
+      '#default_value' => !empty($this->options['transform']),
+      '#title' => t('Transform spaces to dashes in field label (spaces create invalid XML markup).'),
+    );
+  }
+}
