Loading ...
Sorry, an error occurred while loading the content.

10420XmlSerialization issue

Expand Messages
  • omkar singh
    Oct 3, 2005
      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.HardwareVersion</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.HardwareVersion</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>


      Yahoo! for Good
      Click here to donate to the Hurricane Katrina relief effort.
    • Show all 3 messages in this topic

    »
    «