解析XML文件(为foreach()提供的参数无效)

So I have this xml string which I'm trying to parse and get all the attributes from.

I do this:

$note=<<<XML
<object id="object (hillpalos08_LAs) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="4876" scale="1" dimension="0" posX="2850.19921875" posY="-2246.2998046875" posZ="1.5" rotX="0.494384765625" rotY="351.99645996094" rotZ="323.31665039063"></object>
XML;

$xml=simplexml_load_string($note);

foreach($xml->item->object as $object) {
    echo $object['model'];
}

But I get this error:

Warning: Invalid argument supplied for foreach() (Line 8)