Re: AW: [PEAR-DEV] Package Proposal XML_Parser_Assoc

From: Date: Sat, 31 Jan 2004 06:12:46 +0000
Subject: Re: AW: [PEAR-DEV] Package Proposal XML_Parser_Assoc
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25363@lists.php.net to get a copy of this message
I never tried XML_Tree because it always seemed based on creating the file, not reading it. I guess I'll try that and see what I think. Alan Knowles wrote:
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
                        (
                        )
                    )
                )
            )
        )
    )
)
-- paperCrane <Justin Patrin>

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