Hello Henning,

a kind of naive approach might be uploading the file to your server via a 
webservice implementation of your choice (e.g. python).

You could then create a database from that temporary file on the server. This 
way you could avoid „caching“ the file in memory.

You might also consider switching to a RestXQ based approach.
Another option, regardless how you choose to upload the file, that could speed 
up the process would be Zippig the XML before sending it to the server.

Hope this helps! Feel free to ask for more!

Best Michael

> Am 09.05.2016 um 00:01 schrieb Henning Phan <henningp...@hotmail.com>:
> 
> Hello,
> My case:
> 1. A (non technical) user uploads a 5 GB xml which gets parsed by basex
> 2. Does some queries to check and modify some values
> 3. Downloads the modified 5 GB xml back.
> 
> So I'm planning to allow the user to edit their xml through a web application 
> and therefore the user must upload the xml to the web application. I'm using 
> python and when I receive the xml I want to create a database by using the 
> create function from the client API, but the create(name, content) forces me 
> to load the 5GB in memory which it cannot handle.
> 
> I read the java client API which takes a stream unlike the python API. Am I 
> forced to use java?
> 
> What options are there to solve this problem gracefully? Any options that 
> involve Python?
> 
> Thank you for reading this
> 
> - Henning


--
Michael Seiferle, BaseX GmbH, http://www.basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Fon: +49 7531 916 82 77

Reply via email to