Jiří, it might be interesting to know if the problems are solved with the latest builds of BaseX and the BaseX APIs (6.03), which are found at..
http://basex.org/maven/org/basex/
If you work with the latest sources anyway, please feel free to send us some runnable Java code.
Thanks, Christian
On Mon, Mar 8, 2010 at 10:22 AM, Jiří Kadlec jir.kadlec@post.cz wrote:
Hi,
I'm having a problem with XML DB, when I'm trying to access result as DOM. I'm using this code sequence:
if (res instanceof XMLResource){ XMLResource resource = (XMLResource) res; Node node = resource.getContentAsDOM(); System.out.println("Get content: " + resource.getContent()); System.out.println("Node je: " + node.getNodeName()); }
everytihng goes ok, when i use resource.getContent(), i got expected results but when I try to use resource.getContetAsDOM() a got following exception:
Exception in thread "main" java.lang.NullPointerException at org.basex.query.item.DBNode.<init>(DBNode.java:50) at org.basex.api.xmldb.BXXMLResource.getContentAsDOM(BXXMLResource.java:144) at testmxquery.XQueryDatabaseSample.main(XQueryDatabaseSample.java:186) Java Result: 1
I'm using modified example from your web site.
Thanks for your help
Jiri _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk