Represent deleted data with XML

Nate (6)

Usenet Archive
Joined
Nov 21, 2003
Messages
5
Reaction score
0
Hello,

I am trying to find a good solution of how to notify the consumer of the XML that the data (that was being described by the XML) was deleted on the producer side.

Big picture:
producer ---encodeXML--> Network ---decodeXML--> consumer

The XML that I'm sending is not a list of all the data. The XML only contains the changes made to the data. For example, if I update data1's units attribute and add a data15 node, then that's all that is sent to the consumer is:
<consumer>
<data1 units="ms" />
<data15 units="s" V="50" />
</consumer>

This works fine for adding or updated data. However, the problem I have is how do I represent deletion of data in XML? For example if source deletes "data7"

My first thought was to have an attribute called "deleted" that I would set to true when I delete a node <consumer> <data7 deleted="true" /> </consumer>

This works except sometimes attributes represent data, and how would you specify that the attribute was deleted and not the element. Any thoughts?

If there isn't a good answer, maybe the option is to make sure that attributes (or what they represent) cannot be deleted. :(

Thanks for the help,
-Nate
 

Toni Uusitalo

Usenet Archive
Joined
Jul 25, 2003
Messages
71
Reaction score
0
Hi,
Are you familiar with Xupdate (part of Apache XIndice XML db)? http://www.xmldb.org/xupdate/

That might give you some ideas or complete implementation; that depends on your needs of course.

There's also a lot of XML merging/patching tools available like libxml based XMLStarlet http://xmlstar.sourceforge.net/ see http://www.ixemel.nl/xmlapps/utilities.html for more tools.

I remember Microsoft ADO has/had(?) ability to serialize its recordsets to XML and an ability to update/modify recordset by sending XML patches.

Nate said:
Hello,

I am trying to find a good solution of how to notify the consumer of the XML that the data (that was being described by the XML) was deleted on the producer side.

with respect,
Toni Uusitalo

"And I wish that I was made of stone
So that I would not have to see
A beauty impossible to define
A beauty impossible to believe"
- Nick Cave (Brompton Oratory) - romanticist?

"There are lots of myths that people have around issues of beauty and attraction, and part of the issue is to stop thinking about things in terms of myth, but to use the tools of neuroscience, and start dissecting and understanding how things actually function," said Dr. Hans Breiter, a psychiatrist and co-author of the study."
- The Brain Is Stimulated by Beauty, Study Finds - abcnews.com - scientist?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top