views:

35

answers:

0

I am using vb.net v4

I have a serialize function:

    Public Function ListToXML(ByVal pObj As List(Of dcEventEngine.Event)) As String  
            Dim xmlSerializer As New XmlSerializer(GetType(List(Of dcEventEngine.Event)))  
            Dim strWriter As New StringWriter  
            xmlSerializer.Serialize(strWriter, pObj)  
            Return strWriter.ToString   
    End Function 

pObj is a list of events (this is a calendar application). The [Event] class contains 20 some properties.

If I pass in my List of Events and I have under 200 events then I pass through this function just fine. If I pass in my List of Events and I have over 200 events then I get an error on the following line: xmlSerializer.Serialize(strWriter, pObj) The error is "There aw an error generating the XML document".

It would seem to me that the .Serialize would handle a great deal of data so I figure I am doing something wrong.... I just don't know what it would be.

I would be grateful for any assistance. Thanks Shawn