Page 1 of 1

XML Formatting

Posted: Thu Feb 07, 2019 11:44 pm
by pearljam
Thanks for your help. This is no big deal but I was wondering if this was possible. I have two extract commands, one inside another, and the nested one has a single column called tag. This is a one-to-many table so there may be many tags for each row on the parent table. The problem I'm having is that the tag section of my XML look like this:

Code: Select all

<tags>
  <tag>value 1</tag>
</tags>
<tags>
  <tag>value 2</tag>
</tags>
But I want it to look like this:

Code: Select all

<tag>value 1</tag>
<tag>value 2</tag>

Re: XML Formatting

Posted: Fri Feb 08, 2019 3:26 pm
by webmaster
You can do this by renaming your tags column on the top extract to tag, and renaming your tag column on the nested extract to value, so that instead of this:

Code: Select all

extract
   tags
      extract
         tag
            [value]
You use this:

Code: Select all

extract
   tag
      extract
         value
            [value]
Whenever an extract has a single column called value, Helium will ignore this column when exporting to XML. It uses the same logic as when manually exporting from a table set.