473,386 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Serializing XmlNamespaceManager

Hi All,

Is it possible to serialize an instance of XmlNamespaceManager? I'd like to use it to manage a collection of namespaces and savethat collection for later use but when attempting to serializeit, I get an error message indicating that XmlNamespaceManageris not serializable.

'The type System.Xml.XmlNamespaceManager in Assembly System.Xml,... is not marked as serializable.'

Is there a way to make a class like XmlNamespaceManagerserializable?

Thanks,
Dan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>JecrrEt8OU2lKHc/59hCSQ==</Id>
Nov 12 '05 #1
1 2373
You can have the formatter call your serialization routine by registering a
SerializationSurrogate. See [0] for more info and sample code.

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

[0] http://www.topxml.com/xmlserializer/...nsurrogate.asp

"Dan via .NET 247" <an*******@dotnet247.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
Hi All,

Is it possible to serialize an instance of XmlNamespaceManager? I'd like to
use it to manage a collection of namespaces and save that collection for
later use but when attempting to serialize it, I get an error message
indicating that XmlNamespaceManager is not serializable.

'The type System.Xml.XmlNamespaceManager in Assembly System.Xml, ... is not
marked as serializable.'

Is there a way to make a class like XmlNamespaceManager serializable?

Thanks,
Dan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>JecrrEt8OU2lKHc/59hCSQ==</Id>
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Oisin Grehan | last post by:
Hi, I can't for the life of me get this to work properly. I've searched for examples, but none of the examples quite match my environment. Here is my XML (please treat this as immutable -- no...
1
by: Victor Hadianto | last post by:
Hi All, I have the following code: <snip> XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(@"<?xml version=""1.0"" encoding=""UTF-8""?> <myConfig:myConfig...
9
by: Richard L Rosenheim | last post by:
I'm trying to query a XML file that was created via ADO.NET. My query wasn't returning anything, and I tracked the problem to an issue with the namespace that ADO.NET specified. When I remove the...
1
by: Ivo Bronsveld | last post by:
All, I have quite a challenging task ahead of me. I need to write an object model (for code access) based on a schema, which cannot be made into a dataset because of it's complexity. So I...
10
by: copx | last post by:
I want to save a struct to disk.... as plain text. At the moment I do it with a function that just writes the data using fprintf. I mean like this: fprintf(fp, "%d %d", my_struct.a, my_struct.b)...
1
by: Chris | last post by:
I'm having trouble Serializing a System.Data.DataColumn object. When I try to serialize it, I get the following: System.NotSupportedException: Cannot serialize member...
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
4
by: Jason Shohet | last post by:
We are thinking of serializing an object & passing it toseveral functions on web service. This will happen about 35 times as the page loads. The class has about 20 attributes. We're not sure...
0
by: Timo | last post by:
If there's a better place to ask, please advise. I've serialized a custom collection class using the XMLSerializer, and now I'd like to deserialize it. The xml representation of the serialized...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.