Peter Charles wrote:

Hello,

On this page of the developers guide:

http://xml.apache.org/xindice/guide-developer.html#Working+with+Document
s

There is the following content:

If you had your content already in a DOM tree you could also add the
document as a DOM.
XMLResource document = (XMLResource) col.createResource(null);
document.setContentAsDOM(doc); // doc is a DOM document
col.storeResource(document);

However, createResource must take a Type Parameter

http://www.xmldb.org/xapi/api/org/xmldb/api/base/Collection.html#createR
esource(java.lang.String,%20java.lang.String)



Thanks for pointing out; fixed in the CVS.


That said I get an error of code 0 when I try and insert a DOM document.



Works for me (line 63): http://cvs.apache.org/viewcvs.cgi/xml-xindice/java/tests/src/org/apache/xindice/integration/client/basic/DocumentTest.java?annotate=1.12

Vadim



Reply via email to