ExistDb with Java
ExistDb with Java
Favorites
Tags
Archive
INTRODUCTION
ExistDB allows the creation of collections. It only has one database that can hold
various collections. The Collections can hold xml documents. In Exist to find the
path to your database document the syntax goes by the following doc(’/db/path’)
doc('/db/economia/empresa.xml')
EXISTdB Database 1
In case of sequence of nodes, each must go between parenthesis separated by
commas.
The claus following and preceding are used to place attributes after and before a
specified attribute
The attributes must be inserted before the nodes. Sedna controls them but
❗
existdb doesn’t. So the order should be followed! The preceding and following
seems to not work so its better to use into
EXISTdB Database 2
for $n in nodeOAtributAReanomenar
return update rename $n as 'nouNom'
Replace - Nodes/Attributes
update replace nodeOAtribut with nouNodeONouAtribut
o també
for $n in nodeOAtributAReanomenar
return update replace $n with nouNodeONouAtribu
To indicate the new attribute, follow the rule indicated in the INSERT statement. In
eXist-db 2.0-5.2., replacing an attribute only replaces the content and not the
name of the attribute. Error maybe fixed in later versions
EXISTdB Database 3