473,385 Members | 1,824 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,385 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>

Oct 3 '05 #1
0 953

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...
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. ...
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'...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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: 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...

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.