Over on PHPBuilder, there's a link to a new article by the same author that wrote the useful OCI8/PHP article we posted a while back. This morning, he's back with a new piece covering Converting XML into a PHP data structure.
He shows you how to take just about any XML structure (even with attributes), and create an array out of it that you can use anywhere in your application. He gives you the code and the theory behind creating a class that will parse the XML structure into different values, including _NAME, _DATA, and each key inside of that block of XML. He even shows you, close to the end of the article, how to use the class that you've just produced, and how to output some of the sample results.
Using things like this, you can make XML a more practical feature of your applications - but watch out that you're not just using it because it's the "cool thing to use" in your app. If there's a better way to do it, then use that first...




