Thanks a lot, I read the SimpleXML page a lot, but didn't drop into the ->attributes page itself. again, thanks paul. On Tue, 30 Nov 2004 23:34:14 -0800, Rick Fletcher <fletch@xxxxxxxxx> wrote: > [snip] > > when using print_r on a SimpleXML object that has > > attributes, the attributes are not shown. > > > > I would propose that this is not the desired response. When using > > print_r on an object, it should display all available information > > (even, as the manual indicates, private and/or protected properties). > [snip] > > Now, if people agree with me, that this is infact not the desired > > response. Is this a 'bug' with SimpleXML or print_r? > > On the SimpleXML->attributes documentation page > (http://www.php.net/manual/en/function.simplexml-element-attributes.php) > you'll find this note: > > "SimpleXML has made a rule of adding iterative properties to most > methods. They cannot be viewed using var_dump() or anything else which > can examine objects." > > A pain? Maybe. A bug? No. > > There are a couple of user functions in the SimpleXML documentation > comments that will convert a SimpleXML object to an array. You can then > pass that array to print_r for debugging. > > Find the code here: http://www.php.net/manual/en/ref.simplexml.php > > Cheers, > Rick > > -- Paul Reinheimer Zend Certified Engineer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php