Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Has the Element been Modified ?

From: "Anthony Jones" <Ant@------------.--->
To: NULL
Date: 4/1/2006 2:19:00 PM


"GMG" <nospam@nospam> wrote in message
news:ePi60$VVGHA.424@T......
> I was thinking of cloning the XMLDocument when first loaded and later
> comparing that Cloned (original) XMLDocument to the working version
looping
> through each element. What do you think of this approach ?
>
> "Umut Alev" <UmutAlev@d...> wrote in message


That's quite expensive and messy.  The fact is it will be your code that
actually changes the element as a result of a user interaction.  You could
keep track of what has changed at the point the change is made.  For example
an additional attribute indicating the element is 'dirty' or maintaining an
array of XML elements that have been modified.

My preference revolves around the fact that an XML structure ultimately
needs to be persisted to a set of relational records.  I reserve the
attribute 'action' as an indicator to a change and the action needed
'update', 'new', 'delete' but this happens more at a 'record' level than a
'field' level (using the terms lightly).  I also use the action value of
'dirty' to mark parent nodes in a heirachy having descendants that have had
some change.

It's then a fairly simple thing to extract only changed content from the XML
for posting back to the server.

Anthony.





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent