function recipe_recipeML_export_multi in Recipe 6
Same name and namespace in other branches
- 7.2 modules/recipe_recipeML.module \recipe_recipeML_export_multi()
- 7 includes/recipe_recipeML.module \recipe_recipeML_export_multi()
1 string reference to 'recipe_recipeML_export_multi'
- recipe_recipeML_recipeio in plugins/
recipe_recipeML.module - Implementation of hook_recipeio($type).
File
- plugins/
recipe_recipeML.module, line 37 - recipe_recipeML.module - Enables importing and exporting of recipeML format recipes.
Code
function recipe_recipeML_export_multi() {
// you should not be able to export unpublished recipes
$rs = db_query("SELECT n.nid from {node} n WHERE n.type='recipe' and n.status>0 ORDER BY n.title");
$o = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<!DOCTYPE recipeml PUBLIC "-//FormatData//DTD RecipeML 0.5//EN" "http://www.formatdata.com/recipeml/recipeml.dtd">' . "\n" . '<recipeml version="0.5" generator="http://drupal.org/project/recipe">' . "\n";
while ($row = db_fetch_object($rs)) {
$o .= recipe_recipeML_export_single($row->nid, FALSE);
}
$o .= '</recipeml>';
drupal_set_header('Content-type: text/xml');
return $o;
}