Welcome to WebmasterWorld Guest from 54.234.153.197

Forum Moderators: httpwebwitch

Message Too Old, No Replies

Xml in a .php file

     
3:22 pm on Oct 25, 2005 (gmt 0)

Full Member

10+ Year Member

joined:July 5, 2004
posts:303
votes: 0


I just started learning XML, XSL (mostly because i've started playing with ajax) I was wondering what the best way to integrate xml with PHP? Any help would be great
5:34 am on Oct 26, 2005 (gmt 0)

Full Member

10+ Year Member

joined:July 25, 2004
posts:311
votes: 0


People have not answered my last post :¦

However, I try answering you:
You say, you already know XML syntax, PHP actually pulls latest information (records) from db and dumps that in XML structure (It's really easy; if you know what's XML structure/syntax is..); this file often named 'rss.php' can be syndicated remotely and obviously with latest information. I know just this.

12:28 pm on Oct 26, 2005 (gmt 0)

Full Member

10+ Year Member

joined:July 5, 2004
posts:303
votes: 0


I guess the issue i'm really having is getting xsl and php to work together. Should I be using one or the other and not both?
5:34 am on Oct 27, 2005 (gmt 0)

Full Member

10+ Year Member

joined:July 25, 2004
posts:311
votes: 0


XSL is for presentation (its for transforming) XML file into a presentable form to a user.
(Like CSS for HTML; but XSL is much more complex.)

PHP is for making XML document dynamic..

XML is for easy data sharing and data transport over the Web..

May be, let's wait some seniors to comment :)

7:16 am on Nov 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:July 30, 2005
posts:80
votes: 0


I think what superman is trying to ask is what extension should be used. I am also wanting to know this. Just as XSLT integrates XML into HTML after processed, PHP is also viewed as HTML on client-side after being processed. Can PHP further integrate the XSLT file to still be processed as HTML? Can you declare the document as XSLT, but save it with the PHP extension (.php), so that it can be interpreted on the client-side? Argh! I really wish I knew how to ask the good questions ... is anyone else having trouble with this?
10:35 pm on Dec 16, 2005 (gmt 0)

New User

10+ Year Member

joined:Dec 2, 2003
posts:26
votes: 0


You can use PHP to call an xml file, apply the xsl to it and output the result as html, text etc.

I don't believe you can just call it as include, you have to use php xsl functions to produce an output.

1:49 pm on Dec 23, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 12, 2005
posts:86
votes: 0


Php 5 comes with XML/XSL built in. There is no integration involved.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members