Luc

  First you have to know what the layout is going to be.  For a database
list you could do something like this

 

SET MESSAGES OFF

SET ERROR MESSAGE OFF

 

OUT databaselist.xlm

WRITE '<?xml version="1.0"?>'

WRITE '<databaselist>'

OUT TERM 

 

DROP CURSOR c1

DECLARE c1 CURSOR FOR SELECT databaseName from databasesTbl ..

OPEN c1

FETCH c1 INTO vdatabase 

OUT databaselist.xlm

 

WHILE SQLCODE <> 100 THEN

   WRITE '<database>'

      WRITE .vdatabase

   WRITE '</database>'

   FETCH c1 INTO vdatabase 

ENDWHILE

DROP CURSOR c1

WRITE '</databaselist>'

OUT TERM

 

For every opening tag you must have a closing tag and the tags are case
sensitive.

 

Buddy

 

 

   

 

From: [email protected] [mailto:[email protected]] On Behalf Of Luc
Delcoigne
Sent: Thursday, January 17, 2013 10:42 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - re: writing an xml file.

 

HI, 

 

I have to write an xml -file from within a R:base stored procedure.

 

I have no experience with xml.

What would be the best way to start ?

 

Thanks,

 

Luc Delcoigne

Reply via email to