Page 1 of 1

Using PHP 4 DOMXML for Product Catalogue Display App

Posted: Sat Dec 03, 2005 8:27 am
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

Posted: Sat Dec 03, 2005 7:35 pm
by timvw
Basically, you mean something as in http://www.tonymarston.net/php-mysql/sablotron.html?

Posted: Sun Dec 04, 2005 6:44 am
by kendall
timvw wrote:Basically, you mean something as in http://www.tonymarston.net/php-mysql/sablotron.html?
Yep

thanks for the tip

Kendall

XML Builder

Posted: Sun Dec 04, 2005 9:08 am
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

Re: XML Builder

Posted: Sun Dec 04, 2005 9:15 am
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().