Hi Nafiz,
Am 02.02.2012 11:13, schrieb Michael Seiferle:
I guess you could use the built in EXPORT command.
$session->execute('OPEN myDB; EXPORT path/to/export.xml;CLOSE myDB;')
[...]
Another (again untested :-)) approach might be:
file_put_contents( $filename, $session->execute('XQUERY doc("myDB")') );
one should remark that the first approach would store the XML file on the machine the *BaseX instance* is running on, the second one uses the machine where the *web server* is running. So if these are different in your setup, only one of the snippets will work as expected.
Hope that helps, cheers, Leo