

The global variable DRUPAL_ROOT is available.

Suppressed the output (of line-break) from the Bootstrap by embedding it between ob_start() and ob_end_clean()Īnother issue was with the relative paths for including the includes like bootstrap.inc. Though that the best option would be to suppress any output from the bootstrapping. XML declaration not at beginning of document Specification: XML parsing failed: syntax error (Line: 2, Character: 0)

This was not the case with a fresh Drupal installation. That was actually causing the line-break. A little debugging revealed that it was in fact However there was a line-break ("\n") in the output of the script before the XML was sent to the client. The was supposed to be the first line to reach the client. As I was outputting XML to be parsed by XML readers,
#Html in xml in drupal feeds password
This was for the user_check_password() that I used to validate the username and password provided in the URL.Īnother reason of choosing to build the web service through aĭrupal-Bootstrapped PHP script instead of any other method is my recent tryst with building the web-service for ArticleSpinner, that proved to be an instant hit. The PHP script, so that the Drupal functions will be available for use in my script. I would however have to include Drupal's bootstrap.inc and initiate bootstrapping through drupal_bootstrap() from I have heard about the Services module or customizing the Drupal RSS feed as needed.īut I felt I would be able to build the feed better from a PHP script instead of Services or building a Drupal module to do this. The feed URL had to accept parameters like the Drupal site username and password for authentication, dates forįiltering the nodes to be rendered in the feeds. Was building a web service that serves RSS feeds from an existing Drupal website today.
