Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
sisko
  • 1.7k
  • 1
  • 19
  • 46

Views XML individual taxonomy output

I am using Views and Views Data Export to create a page of XML data from a specific node type.

The node type has a taxonomy field with unlimited output so that views returns all the selected terms as a comma separated value.

However, I need to output the taxonomy terms as separate XML nodes rather than a comma separated list of one.

So, I currently get this output:

<nodes>
 <node>
  <nid>12</nid>
  <categories>Corporate, finance</categories>
 </node>
</nodes>

I would like to get the following:

<nodes>
 <node>
  <nid>12</nid>
  <categories>Corporate</categories>
  <categories>finance</categories>
 </node>
</nodes>

The difference being that I have two categories fields instead of one.

Can anyone help, please?