开发者

Create a custom XML feed with Drupal 7

开发者 https://www.devze.com 2023-02-09 16:37 出处:网络
I need to create a custom XML-feed in drupal 7. Is this possible with feeds? If so, how to and... Where can i set the \'root node\' of the XML?

I need to create a custom XML-feed in drupal 7. Is this possible with feeds? If so, how to and... Where can i set the 'root node' of the XML? Also, I'm adding fields to this XML but these fields need to be wrapped within other elements, how can i accomplish this? e.g.:

<?xml version="1.0" encoding="UTF-8"?>
<xmlns="..."xmlns:xsi="..."xsi:schemaLocation="..."> this is the 'root node' i need to add    
<calendar> these are elements to add around the field  
 <timest开发者_C百科amps>    
  <timestamp>      
   <date>this is the date_field/date>    
  <.timestamp>  
 </timestamps>
</calendar>

So to resume: i only have the field 'date' and everything around (calendar, timestamps, timestamp) i need to add. This needs to be done for almost all fields needed.

The meaning of this all is to export XML customised according to a custom xml-standard. I haven't found a module capable to do this yet, so please advise.

Please advise


You may want to check http://drupal.org/project/views_datasource. I used this in one of my projects. Create a 'view' then add 'page'. Set format to 'XML data document' then add fields and labels. Hope this helps.


I don't know if there is a Drupal 7 module for this...

There is Views Data Export for Drupal 6, might be something there.

This may get you started if you want to build something custom: http://drupal.org/node/276677


I had the same problem, and rather than searching for "xml", I figured any sort of node export format would work. Then I found this: http://drupal.org/project/node_export

It claims to have the ability to customize the xml format


This shows you how to import your xml file into drupal as nodes or content.

http://drupalwalla.blogspot.co.uk/2012/12/use-feeds-module-to-import-xml-data-in.html

0

精彩评论

暂无评论...
验证码 换一张
取 消