AW: AW: [PEAR-DEV] Package Proposal XML_Parser_Assoc
| From: | Stephan Schmidt | Date: | Sat, 31 Jan 2004 10:27:26 +0000 |
| Subject: | AW: AW: [PEAR-DEV] Package Proposal XML_Parser_Assoc | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25364@lists.php.net to get a copy of this message | ||
Hi,
> What my package specifically does different is:
> * segregates attributes and sub-elements into different assoc arrays
> -This is good because attributes are unique while
> sub-elements are not
> * Always puts sub-elements into an array.
> -This allows for one way to access elements instead of
> multiple ways.
> You don't have to do an is_array() to see if an element has multiples
> before you try to access it. You can still access a specific
> element easily:
> $subElem = (is_array($elem['subElem']) ? $elem['subElem'][0] :
> $elem['subElem']) in XML_Unserializer would be
> $elem['subElements']['subElem'][0] with the new package OR
> XML_Parser_Assoc::getElement($elem['subElements'],
> array('subElem'));
> * CData in an element with sub-elements is picked up, unlike
> XML_Unserializer
I could easily integrate these features in XML_Unserializer so you can
switch between the two behaviours.
So I don't think that this package should be integrated in PEAR as it
duplicates functionality.
Stephan