Import predefined data to database using YAML

Hello,

I would need a way to import some data which I already have in the YAML format to be written to the database. This is used especially to preload the database with some standard data like postal codes and different attributes for my objects.

How may I proceed to import the data to the DB? I also have some of the data available as XML so if it would be easier to do it with XML please advise me to do so!

Thank you for your help in advance!

Sven Clement