On Mon, November 13, 2006 9:29 am, Jochem Maas wrote: > that sounds about right. my experience with SimpleXML is that every is > either > a string, an object, an array depending on how you are looking at it > and regardless of > the situation auto-casting can be relied on to NOT do what you > want/expect ... > the most problematic thing I found with simpleXML was the complete > lack of means to > inspect an objects structure/content using funcs like var_dump() [it > seems > lots of __toString() magic lays waste to any attempt to look inside > the object] > > from what I gather the described 'annoyance' is indicative of the > prescribed > SimpleXML behaviour. > > I personally believe that SimpleXML is too clever and/or intuitive for > it's own good > - or maybe I'm just incredibly stupid, either way I decided a while > back to stick to > using the DOM extension for anything XML related because I found it so > much easier to > use and understand.
+1 I couldn't figure *anything* out with SimpleXML because I could never actually "see" what my data was. I'd ask it what it was, and it would say it was an object, so I'd treat it like an object and it would bitch at me so I had to pretend the object was an array and then stumble down to the next node and start this infuriating process all over again. I sure hope somebody out there is getting something valuable out of it, though, as it's obvious somebody went to a lot of effort to make it do all those tricks. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php