i have executed the below query in php $session->execute("insert {" . $row['UDFInformation'] . "} into basex:db(""nhlive"")/NewDataSet");
Note that the PHP API is just a simple wrapper for BaseX commands. If you define valid XQuery expressions, they should work fine within PHP, so it's advisable to first run them in the BaseX GUI or on command-line.
The following tutorials might give you a clue how to perform updates via XQuery Update: – http://xqilla.sourceforge.net/XQueryUpdate – http://www.xmlmind.com/_tutorials/XQueryUpdate/index.html
Best, Christian
but no result as per my understanding Insert is the command udinformation is the xml data and which is being added to nhlive database after /NewDataSet. For your reference i have attached one xml file. There will be more xml files like this to be added in the XMLServer. so it would be like this 1st file content
<NewDataSet> </NewDataSet> 2nd file content <NewDataSet> </NewDataSet> hope you getting what i am attempting to do.
i dont have much idea of XQuery i am just learning them. If you point me link of PHP with Xquery would be great.
Thanks Ganesh K
On Wed, Mar 17, 2010 at 12:36 PM, Ganesh K ganeshk@21chms.com wrote:
Hi Christian, Thanks for your reply, i will find some way. Mean while as you mentioned with regards to api. I tried converting the jar file to .Net using ikvm the compilation was successful without any error and got the dll, but when i tried to use it in .Net below two namespace were not available dont know is it problem of the IKVM or something else. 'Imports org.basex.core.proc.XQuery 'Imports org.basex.data.Result
I also tried using the api using php now what happens i am not able to get the result i.e the xml structure which it contains. i shall mail u with attachment in short while.
Thanks
On Tue, Mar 16, 2010 at 7:05 PM, Christian Grün christian.gruen@gmail.com wrote:
Dear Ganesh K,
thanks for your update. I am sorry I can't give you more information on MS SQL and PHP; it might help to look up the correspondent mailing lists and forums. If you need some particular help on BaseX and its APIs, we'll be glad to help out (note that we might extend our APIs if more people need specific features).
Christian
On Tue, Mar 16, 2010 at 5:29 AM, Ganesh K ganeshk@21chms.com wrote:
Christian, I have tried thats how i check the php is working. Ok let me give my scenario. I got SQL Server (it might be Oracle also) since these both sucks when given xml search, thats the reason for switching for BaseX. Now i will coding in PHP which will connect to the DB (SQLServer/Oracle) and take the data and add some more xml information and pump in BaseX. Then have another PHP interface to search the nodes text or only text. I know this will not be your task but any help will help i am having trouble connecting to MSSSQLServer from Apache/PHP. Hope i was clear, if need any more information then let me know. Thanks Ganesh K
On Tue, Mar 16, 2010 at 3:04 AM, Christian Grün christian.gruen@gmail.com wrote:
Ganesh K,
nice to hear that you successfully manage to use the PHP API. The following example should tell you how to receive results:
https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/php/Example.php
If you need more help, please give us more details on your scenario. Christian
On Mon, Mar 15, 2010 at 8:01 AM, Ganesh K ganeshk@21chms.com wrote:
Dear Christian, Thanks for your reply, i could take some steps and proceed so finally i configured Apache and PHP and i am using that, i executed the php code also so the code is quite successful. But i need some help or guide on how to use the commands on PHP like how to get the results of the executed queries. if you could link to forum also will do ..
Thanks Ganesh K
Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen
basex-talk@mailman.uni-konstanz.de