468,101 Members | 1,539 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

Represent deleted data with XML

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
Jul 20 '05 #1
1 1182
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" <st******@msoe.edu> wrote in message
news:d0**************************@posting.google.c om...
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?

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Abhijit | last post: by
5 posts views Thread by Grant | last post: by
3 posts views Thread by Zorpiedoman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.