Hello,
I am using the XML Serializer to create an XML Schema. In one part of the XML, I have an element called 'parameters', which returns a collection of strings that should be called 'parameter'. The output is supposed to look like this:

Code:
<parameters>
    <parameter>Value 1</parameter>
    <parameter>Value 2</parameter>
    <parameter>Value 3</parameter>
</parameters>
It's coming out like this:

Code:
<parameters>
    <string>Value 1</string>
    <string>Value 2</string>
    <string>Value 3</string>
</parameters>
This is my code for the collection:

Code:
Public Class ParameterCollection
    Inherits System.Collections.ObjectModel.Collection(Of String)

    Public Sub New()
        MyBase.New()
    End Sub
    <Xml.Serialization.XmlArrayItem("parameter")> _
    <Xml.Serialization.XmlElement("parameter")> _
    Default Public Overloads Property Item(ByVal index As Integer) As String
        Get
            Return MyBase.Item(index)
        End Get
        Set(ByVal value As String)
            If index <= Me.Count - 1 Then
                Me.Item(index) = value
            Else
                Throw New IndexOutOfRangeException()
            End If
        End Set
    End Property
End Class
I need the output to look exactly like my example at the top - I can't use an attribute, nor a subclass called 'parameter'. The output does not come out right (at least from what I've tried). I tried using different combinations of xmlserializer directives, and I've tried an ArrayList in addition to the collection all with the same results. It seems as if the serializer is ignoring my directive
to call the element a 'parameter' and just calling it 'string'.

I hope someone can help!
Paul