title: How do I use Access VBA to export to XML with headings for various records?
body: <p>I am writing a code using Application.ExportXML that will export various Access queries to a single XML file. I have the code so far and it is working, but I want to label each record within the query's data that will be exported. For example, I have one query listed in the XML file called "portOfCallList" but I want each record to be labeled "portOfCall". Right now one  record looks like this:</p>
  
  <pre><code>- &lt;portOfCallList&gt;
      &lt;arrivalDate&gt;2015-07-17T00:00:00&lt;/arrivalDate&gt; 
      &lt;departureDate&gt;2015-07-17T00:00:00&lt;/departureDate&gt; 
      &lt;portOfCallName&gt;Southampton&lt;/portOfCallName&gt; 
      &lt;portOfCallCode&gt;GBSOU&lt;/portOfCallCode&gt; 
    &lt;/portOfCallList&gt;
  </code></pre>
  
  <p>I want it to look like this:</p>
  
  <pre><code>- &lt;portOfCallList&gt;
    - &lt;portOfCall&gt;
        &lt;arrivalDate&gt;2015-07-17T00:00:00&lt;/arrivalDate&gt; 
        &lt;departureDate&gt;2015-07-17T00:00:00&lt;/departureDate&gt; 
        &lt;portOfCallName&gt;Southampton&lt;/portOfCallName&gt; 
        &lt;portOfCallCode&gt;GBSOU&lt;/portOfCallCode&gt; 
      &lt;/portOfCall&gt;
      'And then have various other records also labeled "portOfCall" before ending with
    &lt;/portOfCallList&gt;.
  </code></pre>
  
  <p>This is the only thing I need to add into my code, since the rest of the code does what I need it to do. I can post the code if need be.</p>
  
  <p>Let me know if I can explain anything further, and thanks!</p>
  
  <p>Kirby</p>