My CookBook XML Schema

My CookBook application allows to import your recipes from xml files.

Here is a sample of xml recipes :

<?xml version="1.0" encoding="utf-8"?>
<cookbook version="46">
<title>My recipe</title>
<preptime>15 min</preptime>
<cooktime>20 min</cooktime>
<totaltime>35 min</totaltime>
<li>Desc 1</li>
<li>Desc 2</li>
<li>Ingredient 1</li>
<li>Ingredient 2</li>
<li>Step 1</li>
<li>Step 2</li>
<comments>Your comments</comments>
<video>Video URL</video>
<li>Nutritional information</li>
<category>category 1</category>
<category>category 2</category>
<preptime>10 min</preptime>
<cooktime>20 min</cooktime>
<totaltime>30 min</totaltime>
<li>1 1/2 c. flour</li>
<li>2 c. milk</li>
<li>2 eggs</li>
<li>1 1/2 tbsp. oil</li>
<li>1 tbsp. sugar</li>
<li>Little salt melted</li>
<li>Pour the milk into the flour. Stir.</li>
<li>Add the oil, the beaten eggs and the sugar. Stir again.</li>
<li>Let the batter rest for 2 hours. The batter must be fluid. If not, add a little more milk. </li>
<li>Take a frying pan, oil it and pour a small amount of batter and spread it on the bottom. Cook it on one side, then the other.</li>
<li>The "French Crepes" must be very thin. </li>
<li>You can put butter or sugar or jelly or melted chocolate on them.</li>

Description of our XML schema

Our XSD file is available here : mycookbook.xsd

  • cookbook: Root of all recipes
  • recipe : Defines your recipe. You can have one or more recipes in your XML file
  • title : Title of your recipe
  • preptime : Preparation time
  • cooktime : Cook Time
  • totaltime : Total Time
  • description : Description of the recipe. If you want to have line breaks, use the <li> … </li> tags
  • ingredient : Ingredients of the recipe. If you have several ingredients and you want to have line breaks, use the <li> … </li> tags
  • recipetext : Directions. If you want to have line breaks, use the <li> … </li> tags
  • url : Source URL of the recipe
  • video : Video URL of the recipe
  • quantity : Yield
  • imagepath : Path on your phone of the picture of the recipe
  • imageurl : Url of the original picture of the recipe
  • comments : Any comments you want to add
  • nutrition : Nutritional information
  • rating : Rating (Integer 1-5)
  • source : Source or Author
  • video : URL of a video
  • category : Recipe category. There may be several categories


Leave a Reply to android cookbook Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

39 thoughts on “My CookBook XML Schema”