Unable to access elements in SimpleXML

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am creating a REST API in php that parses the XML result given by IBM
here's the php code:

if ($response === false) {
    die('Request failed');}
    $phpobject = simplexml_load_string($response);
    print "Printing title $phpobject->title is
    echo '<pre>';
    echo '<pre>'; }

And this is the output:
SimpleXMLElement Object
    [title] => Search results for query 'new' on index Default
    [link] => SimpleXMLElement Object
            [@attributes] => Array
                    [href] =>
                    [rel] => self
                    [type] => application/atom+xml


    [author] => SimpleXMLElement Object
            [name] => IBM OmniFind Yahoo! Edition API Web Service

    [id] =>
    [category] => SimpleXMLElement Object
            [@attributes] => Array
                    [term] => Default
                    [label] => Default
                )        )

I am able to access the elements in this way $phpobject->title. BUT the
problem is that it only works for elements that have a value, like
"title" and "id" in the above output.
When i try to access the "href" in "link" by using
and "term" in "category" by using
$phpobject->category->attributes->term; it doesnt work.
what could be the reason?  How to access elements that contain "@"?

thanx in advance

Site Timeline