I'm trying to update a node that i've created before via the OSM PHP API. I've developed some functions that makes some CRUD operations by using the open street map API.
My update function is getting the node and the changeset id to make this operation, then i'm making a put request via this url /api/0.6/node/#id
$ls_url_update_node = $this->get_api()->get_base_url() . "/api/0.6/node/".$this->get_id();
$lo_requete = Request::put($ls_url_update_node);
$ls_xml_node = $this->generate_xml($po_changeset);
$lo_requete = Request::put($ls_url_update_node)
->sendsType('text/xml')
->addHeader('Authorization', $this->get_api()->get_authorization_header())
->body($ls_xml_node);
$lo_response = $lo_requete->send();
The genarate_xml function try to generate a valid XML that respect the OSM specifications.
<osm>
<node id="123" lat="..." lon="..." version="142" changeset="12" user="fred" uid="123" visible="true" timestamp="2005-07-30T14:27:12+01:00">
<tag k="note" v="Just a node"/>
...
</node>
</osm>
The OSM Api returns this error message : Cannot parse valid node from xml string. Mayeb i've skip some differences between the creation and the update of a node. So any help please.