Re: Package proposal: PEAR_PackageGenerate

From: Date: Wed, 23 Jul 2003 10:55:42 +0000
Subject: Re: Package proposal: PEAR_PackageGenerate
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18576@lists.php.net to get a copy of this message
On Monday, July 21, 2003 18:56, Greg Beaver wrote: > Martin Jansen wrote: >> On Mon Jul 21, 2003 at 03:5835AM -0400, Greg Beaver wrote: >> >>>Note that the current version simply uses a regular expression to find >>>the old <filelist> section, and this will have to be modified at a >>>future date to be more intelligent, parsing the XML file, >> >> >> You should be able to use some parts of the PEAR installer for this. > I'd like to do that. The only reason I didn't to begin with is the > complete lack of documentation. I'd also, incidentally, like to use > some of the Frontend features of PEAR for phpDocumentor, if I knew how > it worked. :) That's basically what you need: <?php include 'PEAR/Common.php'; $common = new PEAR_Common; // Transform the xml into a php array $xmlarray = $common->infoFromDescriptionFile('./package.xml'); print_r($xmlarray); print_r($xmlarray['filelist']); // Do modifications // Transform the php array into an xml string $xml = $common->xmlFromInfo($xmlarray); ?> -- Tomas V.V.Cox mailto:cox@idecnet.com

« previous php.pear.dev (#18576) next »