Re: Re: xml and php

From: Date: Thu, 15 Aug 2002 22:41:11 +0000
Subject: Re: Re: xml and php
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-112874@lists.php.net to get a copy of this message
On Thu, Aug 15, 2002 at 11:28:51PM +0200, Pafo wrote: > > i cant get information from a deeper node... > <server> > <servers name="ajs" blaa blaa blaa> > <pop>100</pop> > <relic name="george" type="melee"> > <owner>nisse</owner > </relic> > </servers> > </server> Carefully examine the code at http://www.analysisandsolutions.com/code/phpxml.htm It provides you the basic concepts needed to parse any XML document. BUT, you'll need to use your head in modifying the case statements -- and what they do when triggered -- in the StartHandler() and EndHandler() to meet your needs. I only have a few, cursory comments on your code. I haven't read the whole thing because it's long and poorly formatted. But, in short, it seems overly complex for the task at hand. For example, don't set all those variables individually. Store the information in one array. This will cut down on initialization statements up front and global statements in each function. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

« previous php.general (#112874) next »