It could be done in 10 lines. See below implementation using our
EDI language EDI-C.

main () {
xmlelem CatName attlist (CategoryName);
xmldoc Data {CatName; };
EXEC SQL CONNECT TO :"database" USER :"someuser" USING :"somepassword";
EXEC SQL DECLARE cur CURSOR FOR SELECT CategoryName FROM Categories;
for (integer i = 1; SQLSTATE == "00000"; ++i)
   EXEC SQL FETCH cur INTO :Data.CatName[i].#CategoryName;
xmlwrite (Data, "somefile.xml");
EXEC SQL DISCONNECT :"database";
}

Regards

Kurt Svensson

www.inobiz.se





------   XML/edi Group Discussion List   ------
Homepage =  http://www.XMLedi-Group.org

Unsubscribe =  send email to: [EMAIL PROTECTED]
Leave the subject and body of the message blank

Questions/requests:  [EMAIL PROTECTED]

To receive only one message per day (digest format) 
send the following message to [EMAIL PROTECTED], 
(leave the subject line blank) 

digest xmledi-group your-email-address

To join the XML/edi Group complete the form located at:
http://www.xmledi-group.org/xmledigroup/mail1.htm


Reply via email to