Hi Adil,
Did you already check out our documentation [1]? Did you try PUT?
Cheers, Christian
[1] http://docs.basex.org/wiki/REST Am 14.06.2016 6:28 nachm. schrieb "Adil Hasan" paradox2005@gmail.com:
Hello, Thank you for your work in creating this database management system!
I have a question.
I have an XML document that is created in an script. I would like to store the xml document in the xml database. The xml file is created in memory and I'm using python and the REST API to store the data.
I can't figure out how to add an xml document to an existing database.
I tried a POST request with the data being:
<command xmlns="http://basex.org/rest"> <text>open test2; add to test21.xml <![CDATA[<greeting>hello3</greeting>]]></text> </command>
That fails telling me I cannot do multiple commands at one time. So, I thought I could add 2 command statements with the POST request:
<command xmlns="http://basex.org/rest"> <text>open test2</text> </command> <command xmlns="http://basex.org/rest"> <text>add to test21.xml <![CDATA[<greeting>hello3</greeting>]]></text> </command>
But, that also doesn't work. Does anyone have a suggestion as to how to add an xml document to an existing database (ideally the xml document is not in a file)?
many thanks for your help, adil