[RfC] XML_Simple

From: Date: Sun, 25 Jan 2004 18:41:45 +0000
Subject: [RfC] XML_Simple
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25265@lists.php.net to get a copy of this message
Hi, As some of you may know, I proposed XML_Simple some days ago. It was meant as a drop-in replacement of simpleXML in PHP4. Due to some features of simpleXML (or PHP5 to be more specific) I think this is not possible to full as some things cannot be mimicked... Still I think XML_Simple could be quite useful for people who have to stick to PHP4 for some reasons, but I'd like to change the API a little bit: $xml = XML_Simple::loadFile( $filename ); echo $xml->foo->bar->toString(); echo $xml->foo->bar->getAttribute( 'foo' ); The difference to simpleXML is that it's not possible to use just the tagname to get the string or use an array syntax to access an attribute. Instead I would add to methods toString() and getAttribute() (with matching set* methods). I would completely remove the PHP5 driver and all references to simpleXML (instead a 'inspired by simpleXML). The features would include: - load any XML document - Modify it, by modifying the objects - Store it Now I need your opinion: Would you like to have such a package in PEAR or do we stop creating packages that are not needed anymore in PHP5? Stephan --- Stephan Schmidt schst@php-tools.net http://www.php-tools.net

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