Hi, when you are inserting a document, there is something special done to each node. If there is something wrong with your document you get this error. I got it when I put up a document and had a text node that was null. Which is not well formed. Are you sure that your document is well formed?
Heike > -----Original Message----- > From: Unico Hommes [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 20, 2002 4:15 PM > To: [email protected] > Subject: RE: Exception : Collection Document Malformed > > > OK, so I guess nobody had an idea as to what might be causing > this problem. Perhaps someone can then explain what the > message 'Collection Document Malformed' may be referring to ? > The collection document is the document that carries the > collection configuration right ? I guess that by creating a > collection thrue xmldb api the system is providing a default > collection document ? Any ideas ? > > regards, > Unico > > -----Oorspronkelijk bericht----- > Van: Unico Hommes > Verzonden: Monday, March 18, 2002 6:28 PM > Aan: [email protected] > Onderwerp: Exception : Collection Document Malformed > > > Hi, > > When adding some xml documents to xindice I am getting the > following exception : > > <exception> > org.xmldb.api.base.XMLDBException: Collection Document Malformed > </exception> > > In my code I use only the xmldb api, nothing xindice specific : > > <code description="creating a new collection"> > > CollectionManagementService service = > (CollectionManagementService) > parentCollection.getService("CollectionManagementService","1.0"); > childCollection = service.createCollection("new"); > > </code> > > <code description="adding new resource"> > > byte[] data = someObject.getContentBytes(); > Resource resource = > collection.addResource("document.xml",XMLResource.RESOURCE_TYPE); > resource.setContent(new String(data)); > > </code> > > Attached is one of the xml documents I am having problems with. > > BTW: I don't have any problem adding this document with the > xindicadmin tool to the same collection. > > Seems to me to be some kind of encoding problem ? Anybody > know of a solution ? > > Thnx, > Unico >
