バイトデータを取得しているとき、以下のようにXELementに変換しようとしています
using (Stream streamResult = new MemoryStream(byteArray))
{
XElement xElement = XElement.Load(streamResult); // exception thrown here
}
例外の詳細は次のとおりです。
System.Xml.dll PageRequest::PostProcess でタイプ 'System.NotSupportedException' の最初の例外が発生しました: System.NotSupportedException: System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) で System.Xml で NotSupportedException .XmlTextReaderImpl.FinishPartialValue() で System.Xml.XmlTextReaderImpl.get_Value() で System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) で System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o) で System. Xml.Linq.XElement.ReadElementFrom(XmlReader r, LoadOptions o) で System.Xml.Linq.XElement..ctor(XmlReader r, LoadOptions o)
で System.Xml.Linq.XElement.Load(XmlReader リーダー, LoadOptions オプション) でSystem.Xml.Linq.XElement.Load(ストリーム ストリーム、LoadOptions オプション)
XML に問題がありますか?