Inserting multiple documents with one http request


Has anyone tried inserting multiple documents with one http request using tamino Java API?

My requirement is to upload an xml file into Tamino database. And this xml file contains multiple documents.

How can I use Tamino Java API to handle? Trying to figure out how to use TXMLObject, as the example shows read from an XML file with single document.

Generally the API does not support working on multiple documents at a time. However there is one possibility. An insert() in the API finally results in a X-Machine “process” command, which also accepts multiple documents, when they are provided in the “Tamino Data Loader” Format. You have to create a single TXMLObject from this format (an XML file containing all documents in a wrapper). Please see also the online documentation (“X-Machine Programming” and “The Tamino Data Loader”).

The attached file is a simple example of this format. The format does allow optional docnames per document. The TXMLObject.getId() method will only return the first id found. This is what one would expect as it is only really intended for single documents!
Square.xml (448 Bytes)

Thanks. I managed to get what I want by using your examples.