I've been tasked with building a lightweight weblogging system for use on systems without access to a database, but with access to php.
Now why anyone would be on a system that allows users to use php but doesn't give them database access is beyond me, but hey I'm just the code monkey right?
Well, so I say to myself, "Self, now is your opportunity to learn something about XML. XML will be perfect for this project."
So I come up with a valid XML doc encapsulating weblog entries.
Now here is my problem. While it is relatively easy to slurp up, transform, and output an XML file there is absolutely no easy or elegant way to sort, query, add new entries, delete entries, modify entries, or otherwise interact dynamically with this XML file.
Oh, I know I have access to some of that through the DOM engine but it's a GIANT pain, and its slow, and its UGLY.
Its one of those things that comes down to: You only have to write it once so just write it. But I absolutely cannot see any reason to use XML instead of a comma sep'ed flat file or a DB.
Caveat: XML obviously is king at taking data and putting it into some kind of reasonably sane format and sending over the wire to another completely different system. But then you're still working with a DB and just creating XML.
Can someone help me see what I'm missing, or perhaps point out a better way to do this?