Represent deleted data with XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nate

    #1

    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
  • Toni Uusitalo

    #2
    Re: Represent deleted data with XML

    Hi,
    Are you familiar with Xupdate (part of Apache XIndice XML db)?


    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" <stoddarn@msoe. edu> wrote in message
    news:d0899d75.0 401091228.7cc6e 0e1@posting.goo gle.com...[color=blue]
    > 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.[/color]


    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?



    Comment

    Working...