Alaska Software Inc. - Program for create xml
Username: Password:
AuthorTopic: Program for create xml
KariProgram for create xml
on Fri, 20 Apr 2012 09:25:26 +0200
I have to read a lot of data from databases
and put them in a xml-file

Has anyone som xml creator to recomend,
which I can activate with my function?
Best regards
Kari
Chris AndriesRe: Program for create xml
on Tue, 24 Apr 2012 11:29:10 +0200
Hi,

We use the following: http://www.chilkatsoft.com/chilkatxml.asp

It is free, easy to implement and fast.

Best regards,
Chris Andries.


"Kari" <progex.data.@progex.se> wrote in message
news:10459a5b$31ba5d45$13cbf@news.alaska-software.com...
> I have to read a lot of data from databases
> and put them in a xml-file
>
> Has anyone som xml creator to recomend,
> which I can activate with my function?
> Best regards
> Kari
>
>
Thomas Braun
Re: Program for create xml
on Wed, 25 Apr 2012 09:59:28 +0200
Kari wrote:

> I have to read a lot of data from databases
> and put them in a xml-file
> 
> Has anyone som xml creator to recomend,
> which I can activate with my function?

I don't think you need a library to just write XML to a file - basically
fopen/fwrite/fclose should do the job... to get an idea, you could use a
function similar to this to create an XML "record":

FUNCTION GetXMLRec(lEncode, aFields)
LOCAL cRet, nI, nLen

   DEFAULT lEncode TO .F.
   DEFAULT aFields TO dbStruct()

   nLen := LEN(aFields)

   cRet := '<record id="' + ALLTRIM(FIELD->ID) + '">'

   FOR nI := 1 TO nLen
      cRet += XmlField(aFields[nI,DBS_NAME],,, lEncode)
   NEXT

   cRet +=  "</record>"

RETURN cRet

But of course the actual structure depends on your needs or how the XML is
defined.

Thomas