homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

php and xml?
I have a problem is xml the solution?
Sarah Atkinson

10+ Year Member

Msg#: 3771332 posted 7:00 pm on Oct 22, 2008 (gmt 0)

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.



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

Msg#: 3771332 posted 4:54 pm on Nov 7, 2008 (gmt 0)

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).

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved