homepage Welcome to WebmasterWorld Guest from 54.224.179.98
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
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




msg:3771334
 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.

 

eelixduppy




msg:3782078
 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