xml and xsl

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

you're doing essentially hat I had in mind. It's verbose, to be sure.
Hmm. I was thinking of some sort of metadata mapper, where this XMLWriter takes the objects, reads out the public variables and stuffs them in XML. Obviously, there'd be problems with circular references. It's still a vague idea. I'm also wondering whether or not it would be appropriate to put XML generation code in the model classes themselves.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

That's what I do - each model will generate XML either from the database or a chached copy, depending on modtime. Updating the model invalidates the cache - you can update the model however you see fit.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Okay, now I'm confused. Could you elaborate?
Post Reply