[PHP] search db or files?

So im wondering, for my next project I was going to use XML files to store the data, but I want the site to be able to search what would be in the <content> tag. Would it be wiser to use a database rather than XML, which would envolve opening the xml file, parsing it then working out if the needle is in the content?

Well the XML would require more scripting but its not in any way more difficult or intensive. I prefer to use both. Keep everything in a database and then output that data as XML that way I can use XML when I need it and just use the straight Database when I need to…

Well, with XML you would either have to create your own search function or have some server-side program do it for you. Databases usually have their own search functions you can use, and some of the time, implement a more efficient method.