Group: microsoft.public.dotnet.framework
From: jialge@online.microsoft.com (Jialiang Ge [MSFT])
Date: Friday, November 16, 2007 3:35 AM
Subject: RE: Serializing Partial Classes (Datasets)

Hello Marc,

From my point of view, XPathDocument is not declared as Serializable
because of the following possible reasons:

1. Inside XPathDocument (If you use .NET Reflector to view the realization
of XPathDocument), it uses an array of XPathNode to read the nodes of the
xml document. XPathNode is not serializable, and actually, almost all the
classes in System.XML namespace are not designed as serializable.
2. It is very easy to rebuild the XPathDocument object according to the
input stream or file, so it is not necessary to serialize the XPathDocument
object, especially when the input is a very large stream. This fits the
criterion 2.
3. XPathDocument may sometimes work with xml documents in the file system.
This fit the criterion 1.

The reasons above may not be complete, because they are my personal opions.
If you have any other concern or need anything else, please feel free to
let me know.

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Safety Articles | News in English | 20lbs in 30 days | Bluegrass | Usenet Newsfeeds