26770Backends Sharing Datahttp://www.xml.com/pub/a/1999/08/rpc/index.htmlScripting languages have been in use for years to make function calls and to integrate disparate applications. A little bit of script glue can make applications from different vendors talk to each other and exchange information.PHP > Tips and Tutorials > XML and PHPOct 16, 2006
Here's the hypothetical situation. You're an enthusiastic weblogger. For your visitors' convenience, you want to offer them an RSS feed of your latest entries. Plus, you have a bad case of varicose veins.
In my last article I covered the use of the expat functions available to PHP for parsing XML documents using the SAX method. The sample code was a class that read the XML document and generated the HTML to present the data in a nice table. This example was far from perfect due to the fact that the presentation of the data was not separate from the class code that had to parse the XML document. This meant that a slight modification to the HTML generated by the class could break the actual parsing functionality of the class.
Last week, we presented a simple framework (named XMLCast) for distributing content to a variety of devices using XML. This application was built using Microsoft's Active Server Pages (ASP) technology but we realize that many of you aren't using ASP (we aren't either). This article will present the concept of XML parsing using the PHP scripting language. In the coming weeks, we will follow this example up with an expansion of XMLCast using other tools such as XSLT and Cocoon.
Scripting languages have been in use for years to make function calls and to integrate disparate applications. A little bit of script glue can make applications from different vendors talk to each other and exchange information.
This tutorial demonstates the PHP5 SimpleXML extension by using it to update a Google sitemap dynamically. It assumes that you have a basic understanding of PHP and are familiar with XML.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.