I have an XML file which contains the structure of some objects. The object is like this:
class Object:
{
private $name;
private $info;
private $$items;
}
Where $items is an array of objects, so it is recursive. As of now, when I have to list the items I use simplexml to iterate within the elements and show them. My questions are:
1) If I parse the XML and convert the data into the object instead of working with pure XML, would it affect the overall performance of the pages all that much? Will it slow down too much considering that every page the user loads he will have to load the items?
2) Is it a good idea to serialize() a recursive object like the one I’ve defined?