I am trying to use an XML writer to build an xml string into a string builder.
This is working but the string that is returned is cut off at 6134 characters.
From what I read the issue lies with the string builder and not the xml writer.
I've tried increasing it's capacity manually but that doesn't seem to have any effect.
Here is some sample code
StringBuilder xmlout = new StringBuilder(50000000);
using (XmlWriter w = XmlWriter.Create(xmlout))
{
w.WriteStartDocument();
w.WriteStartElement("order");
w.WriteAttributeString("Name", "Value");
// more elements and attributes...
w.WriteEndElement(); //order
w.WriteEndDocument();
}
String xml = xmlout.ToString();
I've put in a very high capacity just as a test.
Any help appreciated