title: Is there any way to make Excel preserve XML attributes in root element?
body: <p>I've been experimenting with using MS Excel 2007 to edit tabular data stored in an XML file. It does a nice job of importing and even validating the XML data against the schema (xsd file), but when I export, it drops the xmlns, xlmns:xsi, and xsi:schemaLocation attributes from the root element. It also changes the default namespace to an explicit namespace.</p>
  
  <p>Here's a before/after comparison:</p>
  
  <p><strong>Before</strong> (the XML file before import into Excel)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;database
    xmlns="experimentManager"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="experimentManager Database.xsd"&gt;
    &lt;conditionTokens&gt;
      ...
    &lt;/conditionTokens&gt;
    &lt;participants&gt;
      ...
    &lt;/participants&gt;
  &lt;/database&gt;
  </code></pre>
  
  <p><strong>After</strong> (the XML file after export from Excel)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;ns1:database xmlns:ns1="experimentManager"&gt;
      &lt;ns1:conditionTokens&gt;
          ...
      &lt;/ns1:conditionTokens&gt;
      &lt;ns1:participants&gt;
          ...
      &lt;/ns1:participants&gt;
  &lt;/ns1:database&gt;
  </code></pre>
  
  <p>Is there any way to prevent Excel from stripping out these attributes and messing with the namespaces? I've read the MS help on XML mapping and import/export, but there don't seem to be any settings in the GUI for what I want to do. If I need to write a custom macro, that's a possibility, but I'd rather not do this if there's a better/easier way.</p>
  
  <p>A second question: Is there a better tool for allowing easy editing of certain parts of XML files using an Excel-like UI?</p>