3

I use drupal6 and views2. I need to create xml file using views. This can be done easily using any xml export module but I am not able to create deeper nested xml output like:

    <itemslist>
     <items>
      <item>
       <item_nbr></item_nbr>
       <item_pic></item_pic>
      </item>
     </items>
    </itemslist>

Can anybody point me to the right direction? Thank you.

1 Answer 1

2
+25

The best way for creating data output from Drupal is by relying on Services it will give you XML-RPC or REST server which will be capable of outputting data in precisely the way you want. I will lay out in steps:

  1. Installing Services module
  2. Creating an endpoint and firring up a server.Here is simple guide how to do that.
  3. To format Service output you will need to create a simple module or rely on contributed modules.

Writing a module may seam bit tricky for a beginner so I suggest using modules like Services Views which will let you add a Service type view page or use Services Entity API or Services SearchAPI.

4
  • Hello, thank you for answer. Unfortunately I was not able to accomplish this. I followed the guide on how to setup services endpoints but I got no "setup successfull" message - only white screen. Also in views, there is no such display as services.
    – loparr
    Commented Nov 14, 2012 at 23:25
  • @user1031742 "Also in views, there is no such display as services" Yes there is none if you do not install Services Views module. The you will be able to create output in the same way you create pages in Views.
    – PovilasSid
    Commented Nov 21, 2012 at 0:12
  • I followed the tutorial step by step and of course the Services views Module was installed. However, no additional display mode was added after this.
    – loparr
    Commented Nov 21, 2012 at 11:14
  • @user1031742 I am sorry but I can not help you with that please bring this to Services Views module`s issue queue.
    – PovilasSid
    Commented Nov 21, 2012 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.