拥有一个使用 SOAP 跨 Web 服务发布 XML 数据的应用程序。
数据直接从 Oracle 数据库中提取并解析为 XML,但由于某种原因,从数据库中提取的数据会引发以下无效 XML 异常。
做了一些研究,看起来它可能是 XML 解析器不喜欢的数据中某处的 NULL 字符。
只是想知道是否有人以前见过这个,如果有,他们是否能够在应用程序或数据库层修复它?
谢谢!
这是堆栈跟踪...
异常 System.Xml.XmlException: '.',十六进制值 0x00,是无效字符。第 1 行,位置 79763。在 System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) 在 System.Xml.XmlTextReaderImpl.Throw(Exception e) 在 System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args) 在 System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar) 在 System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType) 在 System.Xml.XmlTextReaderImpl .ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) 在 System.Xml.XmlTextReaderImpl.ParseText() 在 System.Xml.XmlTextReaderImpl.ParseElementContent() 在 System.Xml.XmlTextReaderImpl.Read() 在 System.Xml。
更新:这是正在发布的数据的选择。基本上只是纯文本,这就是它在数据库列中的存在方式,以逗号分隔。
614494, 2003, 33, 327, 15961, 59652, 2, 2, 3, 2, 1, 10-Dec-08, MY2003 AERO SEDAN, Manual 2.0