I want to remove
<no-name> tag generated by views data export on xml output
Any ideas please?
I have already tried to override template output for the field but no results :(
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
I have found the problem, i was overriding the template but with a the wrong code, i was using the alternative style template with these variables:
<?php print $header ?> <?php print $body ?> <?php print $footer ?>
Instead these should be used :
// Short tags act bad below in the html so we print it here. print '<?xml version="1.0" encoding="UTF-8" ?>'; ?> <<?php print $root_node; ?>> <?php /** * @file views-view-table.tpl.php * Template to display a view as a table. * * - $title : The title of this group of rows. May be empty. * - $rows: An array of row items. Each row is an array of content * keyed by field ID. * - $header: an array of headers(labels) for fields. * - $themed_rows: a array of rows with themed fields. * @ingroup views_templates */ ?> <?php foreach ($themed_rows as $count => $row): ?> <<?php print $item_node; ?>> <?php foreach ($row as $field => $content): ?> <<?php print $xml_tag[$field]; ?>><?php print $content; ?></<?php print $xml_tag[$field]; ?>> <?php endforeach; ?> </<?php print $item_node; ?>> <?php endforeach; ?> </<?php print $root_node; ?>>
I'm posting so maybe it will be helpful for someone else.