Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
An Introduction to SimpleXML
Jun 23, 2004 @ 12:11:14

DevShed.com has a new article posted highlighting one of the features in the upcoming PHP 5 release - SimpleXML.

To the new PHP programmer, XML is quite the mysterious thing. Recently I began writing a website that uses an XML template system, so I needed to find an easy way to parse my XML, and output it the way I needed it to be outputted. With PHP4 you have to build your own XML parser that will read and output your XML. So, with that idea I decided begin to explore PHP5, because of its simpleXML extensions.

They start you off with a sample situation - pulling data from your database and putting it inside an XML structure. They pull the data out and, using a function of their own creation, parse these results and stick the appropriate tags where they need to be. Then, working on this foundation, they provide the entire class to show the simple, elegance that is SimpleXML...

tagged:

Link:


Trending Topics: