Hi There,
I need to load our db from a client xml, the problem is the server cannot reach the client so remote url is not an option.
I think I need to use the -I/-i options, but I couldn't find documentation about how to use it. Can you show me a little example?
Thank you! Gilad.
Hi Gilad,
Welcome. Some questions:
I need to load our db from a client xml
What do you mean with "load our db from a client xml"? Do you want to retrieve documents from a BaseX database or store new documents?
the problem is the server cannot reach the client so remote url is not an option.
So you would like to access a client machine from the server?
Looking forward to more details, Christian
Hi Christian, Sorry for lazy explanation. I will try to rephrase: Given a server with basex-server and a remote client, I want to take xml from the client machine and store it on the basex server. (I know I can copy the file from client to server and then store it, but it¹s not possible in my case)
Thanks! Gilad.
On 5/24/16, 1:18 PM, "Christian Grün" christian.gruen@gmail.com wrote:
Hi Gilad,
Welcome. Some questions:
I need to load our db from a client xml
What do you mean with "load our db from a client xml"? Do you want to retrieve documents from a BaseX database or store new documents?
the problem is the server cannot reach the client so remote url is not an option.
So you would like to access a client machine from the server?
Looking forward to more details, Christian
(I know I can copy the file from client to server and then store it, but it¹s not possible in my case)
Did you already have a look at our existing APIs (REST, Client Bindings, etc.)? See our documentation for more details [1].
Hope this helps, Christian
Can’t I do it with BaseXClient? I couldn’t find docs for BaseXClient and the –I/-i options…
BTW: The xml I need to store is someithing like 4MB so the command “Add test.xml <XML content…>" is not working.
On 5/24/16, 1:36 PM, "Christian Grün" christian.gruen@gmail.com wrote:
(I know I can copy the file from client to server and then store it, but it¹s not possible in my case)
Did you already have a look at our existing APIs (REST, Client Bindings, etc.)? See our documentation for more details [1].
Hope this helps, Christian
See e.g. [1] It is linked from our documentation: Developing → APIs → Clients → Java.
[1] https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/or...
On Tue, May 24, 2016 at 12:52 PM, Gilad Wagner giladw@mintigo.com wrote:
Can’t I do it with BaseXClient? I couldn’t find docs for BaseXClient and the –I/-i options…
BTW: The xml I need to store is someithing like 4MB so the command “Add test.xml <XML content…>" is not working.
On 5/24/16, 1:36 PM, "Christian Grün" christian.gruen@gmail.com wrote:
(I know I can copy the file from client to server and then store it, but it¹s not possible in my case)
Did you already have a look at our existing APIs (REST, Client Bindings, etc.)? See our documentation for more details [1].
Hope this helps, Christian
PS: Maybe it could help if you spend a bit more time in your wording.. Are you talking about the BaseXClient Java class or the "basexclient" startup script? With the latter one, if you use -i, your input will be bound to the context item. You could potentially store such a file via db:add:
basexclient -i doc.xml -q "db:add('database', ., 'doc.xml')"
On Tue, May 24, 2016 at 12:53 PM, Christian Grün christian.gruen@gmail.com wrote:
See e.g. [1] It is linked from our documentation: Developing → APIs → Clients → Java.
[1] https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/or...
On Tue, May 24, 2016 at 12:52 PM, Gilad Wagner giladw@mintigo.com wrote:
Can’t I do it with BaseXClient? I couldn’t find docs for BaseXClient and the –I/-i options…
BTW: The xml I need to store is someithing like 4MB so the command “Add test.xml <XML content…>" is not working.
On 5/24/16, 1:36 PM, "Christian Grün" christian.gruen@gmail.com wrote:
(I know I can copy the file from client to server and then store it, but it¹s not possible in my case)
Did you already have a look at our existing APIs (REST, Client Bindings, etc.)? See our documentation for more details [1].
Hope this helps, Christian
Awesome! This is exactly what I needed.
On 5/24/16, 1:58 PM, "Christian Grün" christian.gruen@gmail.com wrote:
PS: Maybe it could help if you spend a bit more time in your wording.. Are you talking about the BaseXClient Java class or the "basexclient" startup script? With the latter one, if you use -i, your input will be bound to the context item. You could potentially store such a file via db:add:
basexclient -i doc.xml -q "db:add('database', ., 'doc.xml')"
On Tue, May 24, 2016 at 12:53 PM, Christian Grün christian.gruen@gmail.com wrote:
See e.g. [1] It is linked from our documentation: Developing → APIs → Clients → Java.
[1] https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java /org/basex/examples/api/AddExample.java
On Tue, May 24, 2016 at 12:52 PM, Gilad Wagner giladw@mintigo.com wrote:
Can’t I do it with BaseXClient? I couldn’t find docs for BaseXClient and the –I/-i options…
BTW: The xml I need to store is someithing like 4MB so the command “Add test.xml <XML content…>" is not working.
On 5/24/16, 1:36 PM, "Christian Grün" christian.gruen@gmail.com wrote:
(I know I can copy the file from client to server and then store it, but it¹s not possible in my case)
Did you already have a look at our existing APIs (REST, Client Bindings, etc.)? See our documentation for more details [1].
Hope this helps, Christian
basex-talk@mailman.uni-konstanz.de