在Microsoft c#Visual Studio中,我使用XPathNavigator读取和操作XML数据集。抛出的异常在确定读取的XML文件的问题方面非常具有描述性。有一个文本字段超出了字符串长度所允许的限制。因此,我想知道该限制是多少。另外,我也乐于接受有关如何在编程之前或过程中以编程方式解析xml文件的建议。
如果有任何疑问,这里是调用堆栈:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)
at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)
at System.Xml.XmlTextReaderImpl.ReadData()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor(String uri, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor(String uri)
at UseXPathNavigator.BooksXmlNavigator.Main(String[] args) in C:\Users\Xarzu\source\repos\XMLSpecial\XMLSpecial\Program.cs:line 128