|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do you USE xml?
Hi
Im in need of a few gaps being filled in for me. Im currently learning PHP but I have an eye on the future and I would like to learn XML / XSL as I can see some benefits of the standard. BUT when it not concerning creating data that can easily be exhanged between systems and creating data with descriptions. What is the use of it? as in for a middle of the road web developer using mysql/firebird and PHP? Ive got this nice process flow in my head of mysql db >> php extracts data and creates xml file >> xsl to transform it to XHTML >> css to style the xhtml >>> viewed in browser. which seems like a nice flow but the quesiton is WHY the complication? |
|
#2
|
|||
|
|||
|
Hi,
The most advantages of such architecture are how easily you can change your template with a new one and implement a number of versions that use different templates. That may be the case if you are ASP and need to provide different stylings for your web-system for different clients. |
|
#3
|
||||
|
||||
|
one of the driving forces behind the complication is an attempt to make it simpiler
![]() Seperation of jobs. The database stores your info, php parses it out into xml. then the xml is parsed against the xsl to form xhtml and finally the css is thrown in the mix and it looks purty ![]() You have those seperated all your data from your information and from the method that turns that data into information. You can also take your data out at the various stages and do different things, say your clients use both computers and cellphones to view your information, you cant use the same css for them can you? Thats where the power is IMHO. seperating out tasks and data. hope that helps ya, there are many articles all about the merits of this approach all around the internet. -Teflon
__________________
Teflon - The Black <desc>Mark This Up</desc> |
|
#4
|
|||
|
|||
|
Thanks to both of you. Its all clear now
HAve been doing ALOT of reading and i am very much into the idea of XML. As it happens im currently learning php (ive given myself 6 months to be an intermediate user) and i think that xml would be a good technology to learn along side to give me a good choice of projects to learn from. This may be the wrong forum, but what xml parsers are available for php? Ive read about sablotron, but i user xampp so i never had to compile php or get my hands dirty with apache. |
|
#5
|
||||
|
||||
|
i use sablotron.
If you want help setting it up i may be able to help you. It should not be that difficult. Basically you uncomment a line in your php.ini file and make sure that a .dll file is in your php/extensions/ folder http://us3.php.net/xslt look under installation Another option is to not use "any" parser. the clients browser should be able to parse the xml and the xsl by simply bringing up the .xml, provided all the links are in place. -Teflon |
|
#6
|
||||
|
||||
|
If you are using XML and XSLT you should have a look at PHP 5. It uses a new XML library and is a lot better than Sablot.
Sending the XML and XSLT to the browser is not something I like doing on the internet since it makes it unavailable to legacy browsers. I prefer to do the transforms server side and then pass the HTML. If you have an intranet or controlled environment then you may consider client side transformations. |
|
#7
|
|||
|
|||
|
You can use URL to put rss on your website. Just cut and paste the rss or xml feed url there and you put javascript to show feed on your site.
|
|
#8
|
||||
|
||||
|
Quote:
How about not spamming the forums with your site. All your posts so far have been spamming your site. How about making a valid contribution before you get banned. |
|
#9
|
||||
|
||||
|
Damn those legacy browsers!!!
Legacy browsers are definetly something to think about though. And also remember that your clients processing power may not be as good as your development machine, so those transforms could take some time. ps. Finally my clients are moving to a better browser than netscape 4.78, in september.... How is the php 5 tranformer? I havent gotten a chance to play with it as I just got people to install 4.3.7, which is what Ive been using. I need some good reasons to tell them they need to upgrade so I can use some of the php5 features. sorry for taggin onto a post. -Teflon |
|
#10
|
||||
|
||||
|
PHP5 uses libxml (http://www.xmlsoft.org/) which is a lot better than Sablot.
Best resource for PHP5 is www.Zend.com/php5 http://zend.com/manual/migration5.functions.php http://zend.com/manual/migration5.oop.php Those two links are good to show differences. |
|
#11
|
|||
|
|||
|
I use XML by using XML Tamino Server, an XML database. It's a great tool for a Content Management System; you can store whatever you want there and then show it in whichever way you want it.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > How do you USE xml? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|