Welcome to WebmasterWorld Guest from 54.226.25.231

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php and xml?

I have a problem is xml the solution?

     

Sarah Atkinson

7:00 pm on Oct 22, 2008 (gmt 0)

10+ Year Member



I'm working on building a site. All my product info for their individual product pages is in a text files.

My thoughts were to use php to splice the file and propagate all the pages.. normally I would just pull from a DB but that solution has been shot down from our DB manager.

I have 2 thoughts.

1. add XML tags of <productname><tagline><bodytext> to the xml file then parse getting the parts I need for each page.
However I'm thinking as this gets to be a big file that this might take too much time and memory to parse and store in the php code.

2. create an individual file for each product using the data i have. I think this would be the easiest and most efficient however if could make updating a real pain.... on the other there shouldn't be a lot of updating going on with this data maybe once a year... twice at the most.

eelixduppy

4:54 pm on Nov 7, 2008 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



Is there a good reason why you cannot use a DB? This would definitely be the better solution.

Also, it should use less memory allocation to use an event-based XML parser (eg Expat) instead of a tree-like one (eg SimpleXML).

 

Featured Threads

Hot Threads This Week

Hot Threads This Month