Question

I am running a simple Sedna database but have a small issue. I have multiple XML files that I want to add all to the same document. The files all follow the same schema.

LOAD "1.xml" "mydoc"&
LOAD "2.xml" "mydoc"&
LOAD "3.xml" "mydoc"

But I get the following error

SEDNA Message: ERROR SE2001
Document with the same name already exists.
Details: tariffs

How can I go about adding each file to the existing document without removing the existing contents of the document? Is this possible?

Any help much appreciated. Thanks

Was it helpful?

Solution

Just like Ilya answered you in the Sedna discussion list: there is no way to load many xml files into one document. But perhaps what you want is collection. You can create a collection by:

 CREATE COLLECTION "mycol"&
 LOAD "1.xml" "1" "mycol"&
 LOAD "2.xml" "2" "mycol"&

After that collection may be queried just like document:

collection('mycol')//some-nodes&

Please read Sedna documentation (especially this: http://modis.ispras.ru/sedna/c-samples.html#loadcol) for more information on collections.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top