tags:

views:

46

answers:

2

I need to be able to dump my user table inside Drupal to an XML document that I can hit from a path in a browser.

e.g. mysite.com/users.php

Looking for an easy way to do this, an existing module would be ideal. Not sure if QueryPath does this.

Thanks.

A: 

Using Views Bonus Pack you can first build a view of all your users, and then create a 'feed' display. In the feed settings, you'll be able to select XML as one of the formats. You can then set the path to anything you like.

jhedstrom
A: 

QueryPath can do this.

There is a database extension that comes with QueryPath's Drupal module that basically lets you take any SQL statement and inject the results into an XML document. The basic idea is explained here:

http://technosophos.com/content/using-querypath-interact-sql-database-part-1

The Drupal module has Drupal-specific DB bindings though. (So stuff like {table} is correctly translated.)

I've also used the Views Datasource module to do this, but it's buggy. The last two times I did it, I had to edit the source code for the module first.

Technosophos