Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - PHP to dynamically generate XML >Thread Next - Re: PHP to dynamically generate XML Re: PHP to dynamically generate XMLTo: NULL Date: 7/5/2005 12:19:00 AM On 4 Jul 2005 12:10:31 -0700, petermichaux@y... wrote: >I am interested in critisim of how I implemented each method. In the second (correct) one you use a DOM and append various elements to it. In the first one you generate XML as a string (bad) and then get the DOM to parse it (super bad). This is ugly, non-robust and slow. Don't duplicate in your application code things that the DOM should be doing. >For example, one php function queries a database table for a list of CD >titles. A second php function loops through this CD title list and gets >the track listing for each CD from another table in the database. That's very bad database querying technique. Rather than one query with a join in it, it's separate queries for the two steps - and the second step is repeated. If you want long discussions of why this is just so bad performance-wise, search for "round tripping". | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
