Represent deleted data with XML

Discussion in 'XML' started by Nate, Jan 9, 2004.

  1. Nate

    Nate Guest

    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
    Nate, Jan 9, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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?
    Toni Uusitalo, Jan 10, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Trevor Andrew
    Replies:
    0
    Views:
    950
    Trevor Andrew
    Jul 21, 2003
  2. Steven Burr

    Can XML Schema represent this?

    Steven Burr, Jun 2, 2004, in forum: XML
    Replies:
    2
    Views:
    499
    Steven Burr
    Jun 2, 2004
  3. Replies:
    3
    Views:
    2,179
    Joseph Kesselman
    May 5, 2006
  4. howa
    Replies:
    1
    Views:
    452
    Joseph Kesselman
    Oct 9, 2007
  5. Chumley the Walrus
    Replies:
    2
    Views:
    250
    Tom Gosselin
    Aug 10, 2004
Loading...

Share This Page