I would choose the class hierachy approach. Write your own classes for relationships, people etc.
The pros of this approach: * You do not depend on a datasource: it does not matter where the data comes from ((different) XML sources, remoting [,...]). * You have strong typed objects and you can embed your own events and errors. This means (unit-) testing becomes more effective. The cons: * You have to implement a parser. Best regards from Germany. --- In flexcoders@yahoogroups.com, Boon Chew <[EMAIL PROTECTED]> wrote: > > Hi, > > I am building an app that deals with a fair bit of people relationship data > coming down as XML, so the hierarchical nature of XML actually comes in handy here. I have a few options: one is to serialize each person XML node into an object, and setup the appropriate data structure for hierarchical data traversal (e.g. rooted tree). Another option is to keep everything in memory as XML and accessed the node data via E4X. The third option is to take a hybrid approach, won't consider this route right now unless this appears to be the best. > > My concern is that instantiating thousands of objects will create a > performance issue (happened at another project that dealt with thousands of dto's), not to mention it's very slow to instantiate lots of objects. At the same time, I am not sure how fast E4X is at dealing with large XML. > > Which approach would you take? Which one is likely to scale better? Large > in-memory XML + E4X traversal or data structure with lots of objects + algorthmic tree traversal? > > - boon >