Making an XML file

www.richardspro... - March 20, 2008 - 14:03

Hi,

I've got a flash app in a content block that loads content from an XML file. I'd like Drupal to produce this XML file.

The XML file gives the location of the client's offices and looks a bit like this.

<places>
    <place name="London" theX="12" theY="12" url="/london" />
    <place name="Leeds" theX="5" theY="34" url="/london" />
</places>

So, is there a way to get Drupal to output XML and is there a way to make forms that a user can administer table like data?

Thanks for your help.

Found a way

www.richardspro... - March 31, 2008 - 20:52

This must have been an unusual one as nobody got back to me.

I found a way of doing this and I thought other people might find it useful.

I used the CCK module to create a content type that had different fields. I created a Place type that had 'theX', 'theY', etc as fields.

I then created a Place for all the different places I wanted in my XML file.

I then used the Views module to create a page that displayed a list of all my places. I was then able to alter the template to make it an XML file.

Richard Garside
www.richardsprojects.co.uk

Views to XML?

Mores - April 18, 2008 - 12:29

I also want to convert a view to an xml-file.
Can you explain how you did this?

Thx!

drupal to xml

anakcerdas - April 18, 2008 - 04:05

Hello,

I still don't get how you convert the views template to xml.
How do you do that?

Thx

Regards,

PITRA
www.media-ide.com

I get it

anakcerdas - April 20, 2008 - 08:33

Oh I get it.

You should use Views RSS to display all the contents.

If you use CCK fields (for ex: imagefield), you should also install Contemplate module, then activate "affect RSS output"
Also activate the RSS enclosure.

 
 

Drupal is a registered trademark of Dries Buytaert.