Hi there,
I am have stored one large document in BaseX DB. Now I want to add more to the same DB. Is there any simple way to do the same?
Say, I had a file country.xml given below
<Countries> <Country>A</Country> <Country>B</Country> <Country>C</Country> <Country>D</Country> </Countries>
I stored this in BaseX DB.
Now I have another file with same format
<Countries> <Country>E</Country> <Country>F</Country> <Country>G</Country> <Country>H</Country> </Countries>
I want this file to update the previous DB.... so that the DB will have in all 8 countries.
Is there any simple way to do this...
H John,
XQuery Update will help you [1]; this is one option:
for $c in doc('country-new.xml')//Country return insert node $c into doc('country.xml')/Contries
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Update ___________________________
On Wed, Aug 1, 2012 at 2:10 PM, John Best johnbest5673@gmail.com wrote:
Hi there,
I am have stored one large document in BaseX DB. Now I want to add more to the same DB. Is there any simple way to do the same?
Say, I had a file country.xml given below
<Countries> <Country>A</Country> <Country>B</Country> <Country>C</Country> <Country>D</Country> </Countries>
I stored this in BaseX DB.
Now I have another file with same format
<Countries> <Country>E</Country> <Country>F</Country> <Country>G</Country> <Country>H</Country> </Countries>
I want this file to update the previous DB.... so that the DB will have in all 8 countries.
Is there any simple way to do this...
-- Have a nice day JBest
basex-talk@mailman.uni-konstanz.de