Sure that's possible. Basically, nearly everything is possible with XQuery; sometimes, it's just a challenge to guess how to do it best. The BaseX query editor might help you here. Just play around with the following query in the BaseX GUI, and call it from PHP as soon as it does what you need:
declare option output:omit-xml-declaration "no"; declare option output:encoding "ISO-8859-1"; let $results := ( <tender ID="01">AA</tender>, <tender ID="02">BB</tender> ) return <tenders>{ $results }</tenders>
Christian _______________________________________
On Fri, Feb 3, 2012 at 8:31 PM, Nafiz Al Naharul Islam Grameenphone IT Ltd.
May i export a xml according to my required format ....
Currently using xquery i got following....
<tender ID="01">AA</tender> <tender ID="02">BB</tender>
But i want in following format...
<?xml version="1.0" encoding="ISO-8859-1"?>
<tenders> <tender ID="01">AA</tender> <tender ID="02">BB</tender> </tenders>
Is it possible in php and Basex?
Regards Nafiz