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
40 thoughts on “My CookBook XML Schema”
Import from XML file takes too much time. On my Android 10 device it takes about 3 hours to import 30 ths recipes, on Android 4 – half of a day! Could you improve the import? It makes this great application to be lame.
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.
Thanks, I have updated the documentation
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?
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.
Hi Elle, Thanks for your suggestion. It is not yet planned, but I have added it in our wish list.
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.
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
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?
Sorry I thought that issue was fixed. I will have a look again. Thanks
Thanks for the fast Update Ver. 4.9.1.
You’re welcome 😉
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.
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…
Thank you for your fast reply and the update of the XML Schema. I just tried to import a recipe with a rating value and it works fine.
Sorry this refers to my previous posting…….the site I am asking you to add is http://www.doctoroz.com/recipes
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.
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?
Currently it is not possible…. Maybe one day
There is a reason the recipes are not on their website. They want to sell their book! Also, there is a little matter of copyright….