PDA

View Full Version : XML, XSL and PHP ...


Michiel
08-14-2003, 09:28 AM
Hi,

again I'v been looking at XML to use as a backend for my website. I've been reading about XML and XSL to display the data in IE6 en NN6. I realy like the idea of having a seperate XSL file to display my pages. And I like the XSL-functions to sort and select the data.

Now I was wondering, since not everyone has one of these modern browsers, how does one use XML and XSL in everyday situations? Is it possible to have php read both the XML and the XSL file and then create the XHTML output?

I've read about SAX as well, but I'm not sure how to use it and whether it does what I mean.

Any clarification is very welcome!

Michiel

wox3-iO
08-14-2003, 03:02 PM
> Is it possible to have php read both the XML and the XSL file and then create the XHTML output? <

Yes, it is! PHP has an integrated XML parser (I think...)
I fell in love with ASP (VBScript really) and I'm using it to combine my XML and XSL file and display it as HTML or some other language.

See the attached file. I've gathered misc stuff related to parsing.
I'm using the method which is down at the bottom.

"Reading XML file with ASP"
http://www.stardeveloper.com/articles/display.html?article=2000072801&page=1

ASP + XML is a very powerful duo and at least I will be using them together, for now :)

brothercake
08-14-2003, 06:21 PM
PHP has XSL functions but you may need to install extensions for it.

Check out http://www.php.net/manual/en/ref.xslt.php for the PHP docs