PDA

View Full Version : php that parses the XUpdate Resolver packet?



jeff_f_65
October 18th, 2004, 07:44 PM
I am using Flash with a editable datagrid and a php/mysql backend. I have looked all over and cannot find an example of a php script that parses flash's XUpdate Resolver XML packet. I am not quite to the point where I can write one from scratch, but I am pretty sure I could modify an exisiting one. Also, as I understand it, the php script should send a results packet back. Has anyone done this? Below is an example of the update packet and the returned results packet.

<?xml version="1.0"?>
<xupdate:modifications version="1.0" xmlns:xupdate="http://www.xmldb.org/xupdate">
<xupdate:insert-after select="/addresses/address[1]" >
<xupdate:element name="address">
<xupdate:attribute name="id">2</xupdate:attribute>
<fullname>Lars Martin</fullname>
<born day='2' month='12' year='1974'/>
<town>Leizig</town>
<country>Germany</country>
</xupdate:element>
</xupdate:insert-after>
</xupdate:modifications>

<results_packet nullValue="{_NULL_}" transID="46386292065:Wed Jun 25 15:52:34 GMT-0700 2003">
<operation op="remove" id="11295627479" msg="The record could not be found"/>
<operation op="update" id="02938027477">
<attribute name="id" curValue="105" msg="Invalid field value" />
</operation>
</results_packet>

Any leads would be much appreciated!

jeff_f_65
October 22nd, 2004, 12:29 PM
I think it would be really useful for people

jonesin
October 22nd, 2004, 02:31 PM
A work around that I have used in the past was to create my own class that clones the XML data coming in, and whenever you update information, you compare your updated XML with the original incoming XML file and then send out the differences. All of which can be handled client-side.