Hey guys,

This is a great feature and I wanted to contribute a patch that i created to allow for attachments to work properly with the xml_datasource.

Essentially, when you add an attachment it outputs the XML header at the top of each attachment (oops).

So I have created a simple patch to fix that.


29,31c29
< 
<   $xml = "";
<   if (empty($options['is_xml_fragment']) && !($view->is_attachment)) $xml =  "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
---
>   if (empty($options['is_xml_fragment'])) $xml =  "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";

Comments

shaneonabike’s picture

Sorry this was applied to views_views_xml_style.theme.inc :)

alexander allen’s picture

Status: Active » Fixed

Hi ShaneOnABike,

From your comment I assume that this has been fixed? If it is not fixed please re-open.

Thank you

alexander allen’s picture

Status: Fixed » Closed (fixed)