function recipe_recipeML_export_multi in Recipe 7
Same name and namespace in other branches
- 6 plugins/recipe_recipeML.module \recipe_recipeML_export_multi()
- 7.2 modules/recipe_recipeML.module \recipe_recipeML_export_multi()
1 string reference to 'recipe_recipeML_export_multi'
- recipe_recipeML_recipeio in includes/
recipe_recipeML.module - Implementation of hook_recipeio($type).
File
- includes/
recipe_recipeML.module, line 37 - recipe_recipeML.module - Enables importing and exporting of recipeML format recipes.
Code
function recipe_recipeML_export_multi() {
$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";
// you should not be able to export unpublished recipes
$result = db_query("SELECT n.nid from {node} n WHERE n.type='recipe' and n.status>0 ORDER BY n.title");
foreach ($result as $record) {
$o .= recipe_recipeML_export_single($record->nid, NULL, FALSE);
}
$o .= '</recipeml>';
drupal_add_http_header('Content-type', 'text/xml; charset=utf-8');
print $o;
}