I've been reading about XML, XSL, XPath, etc. I want to start this small script in PHP using XML as the database to create a simple CRUD app. I will be using SimpleXML but after reading some answers over stackoverflow it seems many people suggest DOMDocument (is there anything that benefits using DOMDocument more than SimpleXML?)
Anyway, what bothers me is how to put an ID on them? Should I just start with "1" and then when someone adds a node, increment it and so on?
There is also category, I want to put a have this kind of structure
Parent
- Children
- Children
- Subchildren
I have an idea on how to put it in XML but the problem for me is parsing them.
Anyway, categories doesn't really bother me that much. I'm more interested to know if I should just keep an IDs counts saved in a XML and use that as "reference".