[Mono-list] XmlDataDocument

Jason Diamond jason@injektilo.org
Mon, 27 May 2002 23:44:53 -0700


Daniel Morgan <danmorg@sc.rr.com> wrote:

> Since you are very acquainted with XML in System.Xml, I thought I would
> ask you how would class System.Xml.XmlDataDocument in assembly
> System.Data.dll be created?

I haven't given much thought to implementing XmlDataDocument yet but since
changes to the XmlDataDocument have to be reflected in the DataSet and
changes to the DataSet have to be reflected in the XmlDataDocument, I would
guess that both objects would "listen" to events fired by the other object.
XmlDocument and DataTable (a component of DataSet) both have events that
fire when different types of modifications are made. Really, all of the
listening for both objects could be done inside the XmlDataDocument since it
doesn't look like the DataSet has any knowledege that it's being tied to the
XmlDataDocument and it's the DataSet that's passed into the
XmlDataDocument's constructor where all of the initialization can be done.

Currently, the events in XmlDocument and friends aren't implemented yet. It
would require updates to most of the XmlNode derivatives so it's not a
trivial task. Since I'm currently focusing on getting XPath support working
(which is really one of the major reasons why you'd want to use
XmlDataDocument), I won't be getting to implementing the event notifications
any time soon but you or anybody else are more than welcome to give it a go.

Jason