Is there any documentation for XML styling?

Trying to create a specific xml output.

Thanks

Comments

steven jones’s picture

Category: support » feature

Sorry there isn't any documentation like that at the moment, but there certainly should be.

SidneyGijzen’s picture

I assume XML styling is possible with this module (?). If so, could you give some pointers, so I can try some stuff myself?
I'm more than happy to write down my findings afterwards to support your documentation effort.

s_leu’s picture

In order to style the XML to use different tags than the root tag and item tag you can override either templates. Just copy the original templates in the views_data_export/theme folder into your your_theme/templates folder. The following templates are available:

  • views-data-export-xml-body.tpl.php
  • views-data-export-xml-footer.tpl.php
  • views-data-export-xml-header.tpl.php

There are also preprocess functions available which you can of course override:

  • template_preprocess_views_data_export_xml_body
  • template_preprocess_views_data_export_xml_footer
  • template_preprocess_views_data_export_xml_header

When doing so, checking the original preprocess functions in views_data_export/theme/views_data_export.theme.inc is probably a good idea.

Information on this topic should really go into the README of this module.

steven jones’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Sorry for the lack of attention to your issue, please accept my apologies.

Drupal 7 is going to be end-of-life'd by the community in approximately 1 month.

As such, I am closing all non-critical looking, non-PHP compatibility issues for Views Data Export to tidy up the issue queues and reduce the noise. You can read about this on #3492246: Close down Drupal 7 issues.

If you feel like this issue has been closed by mistake, please do comment about re-opening it.
If you feel like the ticket is still relevant for the 8.x-1.x version of the module, then please search for a duplicate issue first, and if there really isn't one (and you've looked properly) then change the version on the ticket and re-open.

Thanks to everyone involved in this issue: for reporting it, and moving it along, it is truly appreciated.
The Drupal community wouldn't be what it is today without your involvement and effort, so I'm sorry that we couldn't get this issue resolved. Hopefully we'll work together in a future issue though, and get that one resolved :)