Conversion of XmlNode to XdmNode fails
Added by Anonymous over 15 years ago
Legacy ID: #7373949 Legacy Poster: Phanidhar Adusumilli (padusumilli)
I am using saxonb for .net. Calling DocumentBuilder.build(XmlNode) fails as follows: Object reference not set to an instance of an object. at net.sf.saxon.event.Sender.sendPullSource(PullSource source, Receiver receiver, ParseOptions options) at net.sf.saxon.event.Sender.send(Source source, Receiver receiver, Boolean isFinal) at net.sf.saxon.event.Sender.send(Source source, Receiver receiver) at net.sf.saxon.Configuration.buildDocument(Source source) at Saxon.Api.DocumentBuilder.Build(XmlReader reader) at Saxon.Api.DocumentBuilder.Build(XmlNode source) at Utilities.XQuery.Saxon.SaxonExpression.evaluateAsObject(XmlNode node) in C:\phanidhar\workspaces\VisualStudio\Utilities\Utilities\XQuery\Saxon\SaxonExpression.cs:line 25 This error occurs when the XmlNode is picked from a document that was modified(new nodes/attributes were added) in memory after load. When the same code is executed with the XmlNode picked from the same document that was just loaded, works fine. 1. Does anyone know why? 2. Where can I find the debug versions of the dlls? 3. I tried to build the debug version of saxonb for .net, but it failed as the CIL.jar referenced in the classpath is not available in ikvm-0.36.0.11. Where can I find CIL.jar? How can I build the debug version of saxonb?
Replies (2)
RE: Conversion of XmlNode to XdmNode fails - Added by Anonymous over 15 years ago
Legacy ID: #7374434 Legacy Poster: Michael Kay (mhkay)
Probably the best thing to do is to try to construct a repro for this - a simple freestanding program that demonstrates the problem - so that I can run it in my test environment. It's possible to get Visual Studio to do step-by-step debugging of the IKVMC-generated code in the Saxon DLLs, but it's something of a black art. I've never worked out exactly what the configuration settings are that means it sometimes works and sometimes doesn't. Equally, building the .NET product for yourself is not easy, and I don't even attempt to "productise" the build. CIL.jar contains Java stubs of methods in the class ikvm.lang.CIL, and was built by running ikvmstub against IKVM.GNU.Classpath.dll (presumably it could now be done against the OpenJDK library). Michael Kay Saxonica
RE: Conversion of XmlNode to XdmNode fails - Added by Anonymous over 15 years ago
Legacy ID: #7377401 Legacy Poster: Phanidhar Adusumilli (padusumilli)
Thanks for the quick reply. I am trying to reproduce the error in a standalone program. As the source where the problem has occurred cannot be shared I will post it as soon as I reproduce this in a standalone program. Preliminary inspection of the code using saxon indicated that the xml modifications calls are misusing references.
Please register to reply