Not sure if this is what you're looking for, but it works :)
$xmlstr = '<?xml version=\'1.0\' standalone=\'yes\'?>
<container>
<channel>
<item>
<link>www.example.com</link>
</item>
</channel>
</container>';
$test = new SimpleXMLElement($xmlstr);
$t = array();
$a = array("url"=>$test->channel->item->link->__toString());
array_push($t,$a);
echo json_encode($t); // [{"url":"www.example.com"}]