XML ライターを使用して、xml 文字列を文字列ビルダーに構築しようとしています。
これは機能していますが、返される文字列は 6134 文字で途切れています。
私が読んだことから、問題はxmlライターではなく文字列ビルダーにあります。
容量を手動で増やしてみましたが、効果がないようです。
ここにいくつかのサンプルコードがあります
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();
テストとして非常に高い容量を入れました。
どんな助けでも大歓迎