My CookBook XML Schema 39


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">
<recipe>
<title>My recipe</title>
<preptime>15 min</preptime>
<cooktime>20 min</cooktime>
<totaltime>35 min</totaltime>
<description>
<li>Desc 1</li>
<li>Desc 2</li>
</description>
<ingredient>
<li>Ingredient 1</li>
<li>Ingredient 2</li>
</ingredient>
<recipetext>
<li>Step 1</li>
<li>Step 2</li>
</recipetext>
<url>http://www.recipeurl</url>
<video>http://www.videourl</video>
<quantity>4</quantity>
<imagepath>/mnt/sdcard/MyCookBook/images/recipe_img.png</imagepath>
<imageurl>http://www.recipeurl/original_image</imageurl>
<comments>Your comments</comments>
<source>Source</source>
<video>Video URL</video>
<nutrition>
<li>Nutritional information</li>
<li></li>
</nutrition>
<rating>5</rating>
<category>category 1</category>
<category>category 2</category>
</recipe>
<recipe>
<title>Crepes</title>
<preptime>10 min</preptime>
<cooktime>20 min</cooktime>
<totaltime>30 min</totaltime>
<ingredient>
<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>
</ingredient>
<recipetext>
<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></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>
</recipetext>
<url></url>
<quantity></quantity>
<imagepath>/mnt/sdcard/MyCookBook/images/crepes.png</imagepath>
<imageurl></imageurl>
<comments></comments>
<source>Grandma</source>
<video>http://www.youtube.com/embed/FGME3FVga-g?feature=oembed</video>
<nutrition></nutrition>
<rating>4</rating>
<category>Dessert</category>
</recipe>
</cookbook>

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 Comment

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

39 thoughts on “My CookBook XML Schema

  • Reply
    Wolfgang Boeck

    In the above sample and in the description of your XML schema the element “category” is missing.

    Due to the fact that the element “source” ist a complexType maybe the above sample of XML recipes should be also corrected.

    Regards, Wolfgang

  • Reply
    Ed Eddie

    I am using My CookBook and it does a fine job of “Supported” importing web page recipes. I wanted to get some other recipes not allowed to be downloaded. I then exported one of the files in My CookBook. I followed the example of the “Exported XML” file and I made a new XML file. I tried to import my made XML file and I get a blank recipe? I can edit the recipe, where I put in my PNG file. but nothing else shows up in the program My CookBook. Where can I email you the recipe XML file I made, and can you tell me where the formatting problem is?

    regards
    Ed

  • Reply
    Elle

    I’ve been using the app for months and just realized there’s no recipe author or source field. I thought it was because of my import from MacGourmet, but even a new recipe doesn’t have this field. There are a lot of recipes I need to search for by who gave them to me (a friend, my sister) or who wrote them (Alton Brown, etc.) Any plans to add this field in a future release? It would make the app perfect for my needs. Thank you.

    Elle

    • Reply
      android cookbook Post author

      Hi Elle, Thanks for your suggestion. It is not yet planned, but I have added it in our wish list.

  • Reply
    Dawn

    App has great potential!
    I would like to have several cook books as I have thousands of recipes from living cookbook, mastercook etc and thay all have different categories, so 10s of thousands of those…not practical. I see someone else asked for multiple books too. Any plans yet?
    I use the app on a 7″ tablet and don’t want the screen filled with nutrition info. Any way I can turn off display of nutrition, or at least switch to tabbed view?
    Keep up the good work.

    • Reply
      android cookbook Post author

      Hi,
      It is not planned yet to have multiple cookbook…. But it is in our huge todo list. Maybe one day….

      You can change the recipe view and use a tabbed view in the settings of the app

  • Reply
    wboeck

    Today I updated to Version 4.9 and exported my recepies as xml-file and mcb-file. But in the exported xml-files are still no information about “rating”.
    Didn’t you fix this bug?

  • Reply
    wboeck

    First of all, I’d like to say that My CookBook is a very useful app and you did a great job.

    My hint: In the above Description of XML Schema is the element “nutrition” missing.

    My question: Why is the new feature “Rate your recipes” not considered in the XML Schema? Furthermore, why isn’t in an exported recipe (as XML-File) no information about rating?

    Looking forward to your reply with many thanks.

    • Reply
      android cookbook Post author

      Thanks for your comment wboeck
      I have added the element “nutrition” and will export the rating value in the next release of the app. You ‘re right, it’s a bug…
      Best Regards

  • Reply
    LeAnn

    I Just upgraded from the free version to the ‘pro’ version. I cannot get the import to work. I can see my backup file, and it asks me if I want to import it, but nothing helps. If I cant get this to work can I get a refund and uninstall? I sent you an email with a screen capture yesterday.

  • Reply
    James

    I have MyCookbook on my droid phone. The recipes I would like to import are found in the book: 150 healthiest 15 minute recipes on earth by jonny bowden. They do not have these recipes on their website. It is very tiresome to enter each recipe by hand in my phone. Is there a way I can either take a picture of the recipe or type it on my pc and import it that way?