Re: Ways to break up XML into Arrays????

From: Date: Fri, 24 Oct 2003 01:04:12 +0000
Subject: Re: Ways to break up XML into Arrays????
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167379@lists.php.net to get a copy of this message
While it's possible to process XML using regular expression. The whole point of using XML is that you wouldn't have to use hacked solutions like that :-) Scott Fletcher wrote:
Hi Fellas! I don't want to use the PHP's XML feature at this moment because I found out that I need to recompile PHP with the XML support which I can't do at this moment. So, instead of recompiling, does anyone know of a good sample coding or class out there on the Internet that would work I'm looking for something similiar like this... Problem is I don't have good scripts that can handle the quote or double quote without missing up the XML data and PHP Array... --snip-- //Individual <FirstName>Bill</FirstName> <LastName>Clinton</LastName> <Gender>M</Gender> <FavoratePet>Dog</FavoratePet> //Joint <FirstName>Hillary</FirstName> <LastName>Clinton</LastName> <Gender>F</Gender> <FavoratePet>Cat</FavoratePet> //This would be return in array like... echo $XML_Tag['FirstName'][0]; //Output would be "Bill"... echo " "; //Whitespace... echo $XML_Tag['LastName'][0]; //Output would be "Clinton"... echo "'s favorate pet is a "; echo $XML_Tag['FavoratePet']; //Output would be "Dog"... echo " and his wife name is "; echo $XML_Tag['FirstName'][1]; //Output would be "Hillary"... echo " "; //Whitespace... echo $XML_Tag['LastName'][1]; //Output would be "Clinton"... --snip-- Just something like that... Thanks!!! Scott F.
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.

« previous php.general (#167379) next »