|
From: <al...@sa...> - 2015-04-14 18:53:44
|
We are trying to use C# to parse some small xml files. We have used VTD-XML in many other languages and it has worked perfect for us. We noticed that with C# the VTD-XML parser will produce an error that is not an exception, and then it will start to do odd things. A simple test class (Main()) is attached with an XML file that shows the error. When you run the code you will see an error in the debugger (not a thrown exception) right after passing line 23: vtdGen.parse(false); This is the complete error I got from VisualStudio and the Mono debuggers: Exception:Thrown: "permature EOF reached, XML document incomplete" (com.ximpleware.EOFException) A com.ximpleware.EOFException was thrown: "permature EOF reached, XML document incomplete" Just as a comparison, we can read the file in VTD-XML Java without any errors. We are using the libraries from ximpleware_2.11_csharp.zip. We have .NET 4.5 and have tried Windows 7 and Windows 8. We need to work with byte arrays to load vtd-xml. We have worked on this for over a week and cannot get anything to consistently load with VTD-XML C#. No matter how the XML was created (ex: by hand or created from an XmlDocument), we seem to get the EOF error all the time. We need to know what the error means and how to rectify it. Since there is no exception, it causes a silent failure and poses a big problem. Thanks for any assistance, Al |