RestfulService::getAttributes
Gets attributes as an array, of a particular type of element.
Example : <photo id="2636" owner="123" secret="ab128" server="2"> returns id, owner,secret and sever attribute values of all such photo elements.
Signature
public function getAttributes(string
$xml,
[string
$collection = NULL,
[string
$element = NULL]] )
Parameters
$xml
— string- The source xml to parse, this could be the original response received.
$collection
— string- The name of parent node which wraps the elements, if available
$element
— string- The element we need to extract the attributes.