XML を生成しようとすると、次の例外が発生します。
XmlTextWriter xmlWriter = new XmlTextWriter(Response.OutputStream, Encoding.UTF8);
xmlWriter.WriteStartDocument();
xmlWriter.WriteStartElement("userInfo");
それは私に例外を与えます:
WriteStartDocument needs to be the first call.
しかし、ご覧のとおり、最初に WriteStartDocument() を呼び出しました。
何か案は?