Using PHP 4 DOMXML for Product Catalogue Display App

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

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Using PHP 4 DOMXML for Product Catalogue Display App

Post by kendall »

Hello,

I thought i'd throw this idea that i had and get some views on this.

I want to develop a dynamic driven product catalogue display app. using an XML file as my database and PHP XSLT Processor and XSLT as my processing

My application processor appears simple in thoery

I have an xslt document that deals design and layout
and i have another one with processes on what data to get from the xml file

come of the basic xslt process are as follows
  • sort
  • get item by id
  • get items by category
  • a limit of items to get
There will be others but for now this is the basics for a product catalogue

Heres where i want some feedback from.
in theory i propose that i will h ave a php process that takes url parameters that will be used to set some of the xsl variables needed to make the xslt processes work appropriately.

The php process consists for using the "XSLTProcessor" function to import the processing xslt and "resetting" its paramaters then including the xml file for output

so WALLA!!!! this is my project plan What do you guys think....See i dont really know how to implement xml into my php applications and how it should be implemented so this was one of my attempts.

What do you think?

Now bear in mind the following
  • I wanted to a way to implement xml/php
  • I wanted to have a site search which i found would have been complex to incorporate Mysql Database information into
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Basically, you mean something as in http://www.tonymarston.net/php-mysql/sablotron.html?
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

timvw wrote:Basically, you mean something as in http://www.tonymarston.net/php-mysql/sablotron.html?
Yep

thanks for the tip

Kendall
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

XML Builder

Post by kendall »

Does anyone know of any software that will build xml from text content or like you develop a syntax structure and its uses it to have you input data from its structure?

Kendall
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Re: XML Builder

Post by foobar »

kendall wrote:Does anyone know of any software that will build xml from text content or like you develop a syntax structure and its uses it to have you input data from its structure?
Not software, but preg_match()/preg_match_all() and preg_replace(). Create one or more regular expressions to retrieve the data from a text file (your "syntax structure"), then put it into a more manageable form like an array for further manipulation.

If the format is simple, you can also use preg_split() and split().
Post Reply