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

DataType is not shown after serialization

hi,
When I am serializing the array of following ParameterValueStruct class i
didnot get
1> the type and size of array.
2> DataType of each element. It is especially needed in case of 'anyURI'
DataType.
I am using serializer class of XmlSerialization namespace of .NET framework.

public class ParameterValueStruct
{
[XmlElement (ElementName = "Name")]
public string parameterName;
[XmlElement (ElementName = "Value")]
public ParameterValueValue parameterValue;
}

Example of what am getting!
==========================
<cwmp:ParameterList >
<cwmp:ParameterValueStruct>
<cwmp:Name>InternetGatewayDevice.DeviceInfo.Hardwa reVersion</cwmp:Name>
<cwmp:Value>SKYN_PLUS</cwmp:Value>
</cwmp:ParameterValueStruct>
<cwmp:ParameterValueStruct>
<cwmp:Name>InternetGatewayDevice.DeviceInfo</cwmp:Name>
<cwmp:Value>BANT-K</cwmp:Value>
</cwmp:ParameterValueStruct>
</cwmp:ParameterList>

Example of what i want
==========================
<cwmp:ParameterList arrayType="cwmp:ParameterValueStruct[2]">
<cwmp:ParameterValueStruct>
<cwmp:Name>InternetGatewayDevice.DeviceInfo.Hardwa reVersion</cwmp:Name>
<cwmp:Value xsi:type="xsd:anyURI">SKYN_PLUS</cwmp:Value>
</cwmp:ParameterValueStruct>
<cwmp:ParameterValueStruct>
<cwmp:Name>InternetGatewayDevice.DeviceInfo</cwmp:Name>
<cwmp:Value xsi:type="xsd:anyURI">BANT-K</cwmp:Value>
</cwmp:ParameterValueStruct>
</cwmp:ParameterList>

Nov 22 '05 #1
0 824

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

Similar topics

37
by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined...
0
by: Omkar Singh | last post by:
hi, When I am serializing the array of following ParameterValueStruct class i didnot get 1> the type and size of array. 2> DataType of each element. It is especially needed in case of 'anyURI'...
9
by: sandorf | last post by:
When I write: int a; and I want another name for "int", I can simply write typedef int interger but what if I want a more descriptive name for the datatype int a; ? typedef int two_intergers...
3
by: Aaron Clamage | last post by:
Hi, I'm not sure that if this is the right forum, but any help would be greatly appreciated. I am porting some java serialization code to c# and I can't figure out the correct way to do it. ...
3
by: Alexander | last post by:
When i store rule on PC with .NET.SP1 i cant restore them from PC without SP1. An i get this Error: System.Runtime.Serialization.SerializationException: Possible Version mismatch. Type...
0
by: vinayak | last post by:
Hi All , We are Developing an application in which Date is Stored in Oracle Database as Number and the same date has to shown to the user in DateTime Format. We are Using DataTable to Store...
0
by: Chang Lui | last post by:
I have an object marked with <Serializable()and using an xmlserializer to save xml to disk. But I need the XML to include the datatype of the property. I tried using...
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
by: =?Utf-8?B?VmFubmk=?= | last post by:
Hi all, I have the need to generate C# classes from XSD schemas, and the XSD.exe tool is just (almost) great for that. I said "almost" because it seems that every XML Schema datatype other than...
2
by: mkvenkit.vc | last post by:
Hello, I hope this is the right place to post a question on Boost. If not, please let me know where I can post this message and I will do so. I am having a strange problem with std::string as...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.