473,396 Members | 1,942 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,396 software developers and data experts.

Custom Serializtion of element

I have a Class which is defined like the following:
Imports System.Xml.Serialization
Imports System.Security.Permissions
<Serializable()> _
Public Class Response
Private msName As String
Private moDataset As System.Data.DataSet

Public Sub New()
End Sub


Public Property Method() As String
Get
Return msName
End Get
Set(ByVal value As String)
msName = value
End Set
End Property

Public Property Data() As System.Data.DataSet
Get
Return moDataset
End Get
Set(ByVal value As System.Data.DataSet)
moDataset = value
End Set
End Property
End Class
I want to serialize/deserialize the "Data" property as a different type.
How can I do this?
Do I specify an attribute like:
<XmlElement("Dataset", "Data", System.Xml.Schema.XmlSchemaForm.Qualified, True, "aix_ws", 1, Type.GetType("Sometype"))> _
Public Property Data() As System.Data.DataSet
...

If yes, how do you specify the type for the xmlattribute, since it wants a constant and the GetType call doesn't work.

Note: I'm using the standard XMLSerializer. (Not interested in BinaryFormatter fix)
Oct 25 '07 #1
0 653

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sorrow | last post by:
Say I have the following (simplistic) schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"...
1
by: Phl | last post by:
hi, I can use the following code to set focus to standard html elements but if I try to do the same for a custom element, it seems to complain that it does not support a focus method. Does...
4
by: Rudy | last post by:
Hello all, I'm sure there is, just can't figure it out. I have the RGB code and the color number. But the color doesn't exsist in Visual studio.net. Can I add this color to the system pallet it...
3
by: __PPS__ | last post by:
Hello, I'm newbe to xml/dtd (and probably I don't use all the termins correctly). I'm writing an application that parses xhtml file with custom elements and splits it into 2 parts - valid xhtml1.0...
0
by: Thomas D. | last post by:
Situation: --------------------------- I have an 'export'-wrapper to my regular objects. For each regular object there is also an export object. An export object derives from the regular object...
4
by: hellrazor | last post by:
Hi there, I'm trying to consume a web-service that is supposed to return a collection of a custom object. The web-service was not created with C# or VS.net. It was created with IBM VisualAge...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
3
by: Brad Wood | last post by:
If I add my own section to my Web.Config file of my (2.0) web service project (and refer to it by adding a "section" sub-element to a "configSections" element, I then get information messages...
6
by: semedao | last post by:
Hi All, I had working code that made custom serialization on objects that inherit from queue in the inherited queue I create my own GetObjectData: public void GetObjectData(SerializationInfo info,...
0
by: mk189 | last post by:
Hi, I am trying to create XML schema of custom markup language, enriched by XHTML. In simplified version, the XML documet could look like that: <a:alarm-manual xmlns:a="alarm-manual"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.