vagelis
vagelis

Reputation: 464

Add namespace declaration to xml element using xquery

I would like to ask about the way to add namespace declaration into an xml element of BaseX database using xquery. for example I have the following xml

<mynode xmlns:b2t=".."></mynode>

And I want ta add one more namespace for example xmlns:b3t="" in order to get an xml like this

<mynode xmlns:b2t=".." xmlns:b3t=".."></mynode>

Upvotes: 0

Views: 927

Answers (1)

Christian Gr&#252;n
Christian Gr&#252;n

Reputation: 6229

XQuery Update provides no means to add namespace declarations in an existing document. However, namespace declarations will automatically be included if you insert elements or attributes with namespaces.

Upvotes: 0

Related Questions