Does anybody know an easy way to keep a viewmodel in sync with an XDocument which is constantly changing? The XDocument is coming from the Microsoft.VisualStudio.XmlEditor.XmlModel class (http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.xmleditor.xmlmodel.aspx). The same XDocument is constantly updated when a user is changing text in the visual studio editor.
I don't want to use serialisation to parse every time the whole xml into objects. The document is very, and that would be a big performance bottleneck.
This question is somehow similar to my question, but what to fill in on "(helper)"? ViewModel on top of XDocument
Requirements: - The viewmodel must be updated when something in the XDocument tree is changed, and minimum changes must be applied. - Events when a child of an object is changed. - Observablecollections when there are multiple same child tags - Objects must be reused, no new elements each time objects are accessed made from my custom classes. So properties must be used to hold the generated object from xml. The object must be updated with the new childs.
Is there a framework or something available to do this task in an easy way? I think many people have already done something like this, and I don't want to re-invent the wheel.
I hope this question is a little bit clear.