Agridrupal 0.7 xml export

As we promised i write the details about to export drupal nodes in XML format.

 

We used "views-datasource" module, it adds a plugin that allow to create an xml output from views.

You can create the structure of your view and set style to "XML data document",

in settings you can set: schema = raw xml, your document header, the doc to text\xml, nested elements and so on..as you can see in the screenshot attached here.

Then you should modify the template file(views-views-xml-style-raw.tpl.php) in view datasource module,to customize and to make it compliant with standards.

To do this, it is enough few rows of php code, as you can see in the attachment, you can put the name of elements in the labels of fields.

IMPORTANT: to put this template in your theme folder so, if you will upgrade your module, it will not be overwritten.

You can find 3 attached files to explain better what we did.

1)screenshot of settings of style plugin in view

2)screenshot of labels to create names of elements.

3)php template that I renamed txt to attach it here.

 

I hope it will be clear, I am available for any clarification.

thank you and regards,

Antonella

screenshot.JPG62.6 KB labels-elements-name.JPG45.29 KB