Re: AW: [PEAR-DEV] Package Proposal XML_Parser_Assoc
| From: | Alan Knowles | Date: | Sat, 31 Jan 2004 02:53:23 +0000 |
| Subject: | Re: AW: [PEAR-DEV] Package Proposal XML_Parser_Assoc | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25362@lists.php.net to get a copy of this message | ||
This looks alot like XML_Tree ...
I'm not too keen to see a load of XML Parsers in PEAR, that transform some xml format into some array/node structure, this is rather never-ending problem.
I think for all the XML files I had to work with, almost none of them seem to be similar enough to reuse a standard parser->structure code.. - so I always end up writing a small parser.. (based around XML_Tree_Morph)..
I guess.. unless the XML or the structure is a reasonably recognised 'Standard' - there seems little point in adding lots of packages like this in..
Just my 2c for the morning..
Regards
Alan
Note the lack of the "crumb data" cdata. My package gives you this (it is much larger and more verbose, but it tells you exactly what you have): Array ( [CRUMB] => Array( [0] => Array ( [name] => CRUMB [attributes] => Array ( [ID] => 1 )[data] => crumb data [subElements] => Array ( [PARAM] => Array ( [0] => Array ( [name] => PARAM [attributes] => Array ( [TYPE] => id )[data] => 1 [subElements] => Array ( )))[CRUMB] => Array ( [0] => Array ( [name] => CRUMB [attributes] => Array ( [ID] => 2 )[subElements] => Array ( [PARAM] => Array ( [0] => Array ( [name] => PARAM [attributes] => Array ( [TYPE] => id )[data] => 3 [subElements] => Array ( )))))[1] => Array ( [name] => CRUMB [attributes] => Array ( [ID] => 3 )[subElements] => Array ( )))))))