> is there a XML-lib for clipper available?
> All I found until now were links to non existent websites.
>
> Regards
> Fabian
I don't know if you managed to find a XML-lib, but if not I will
happily send you the code I've just created and which might help.
It is based on DBF2XML (written by Yamil Bracho) which was posted
here a while back, but enhanced to include a metadata section
that allows the xml to be used to recreate a DBF from it. The
only downside is that it is S87 source (not the ideal platform
for this task...) and would benefit from a 5.x conversion.
If you would like the sources for DBF2XML and XML2DBF just post
here and I'll email to you. Or, if there is a large demand I'll
put the code on a web page.
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
> I don't know if you managed to find a XML-lib, but if not I will
> happily send you the code I've just created and which might help.
> It is based on DBF2XML (written by Yamil Bracho) which was posted
> here a while back, but enhanced to include a metadata section
> that allows the xml to be used to recreate a DBF from it. The
> only downside is that it is S87 source (not the ideal platform
> for this task...) and would benefit from a 5.x conversion.
>
> If you would like the sources for DBF2XML and XML2DBF just post
> here and I'll email to you. Or, if there is a large demand I'll
> put the code on a web page.
No, until now I'm not a step further.
Actually I can create a XML-file myself easily by writing it step by
step. My problem is, how to read a xml-file into a dbase table.
Especially when there are multiple (but not known how many) tags within
one file.
For example:
<data>
<number>123</number>
<sub>
<first></first>
<second></second>
</sub>
<sub>
<first></first>
<second></second>
</sub>
</data>
How to get such a structure into an dbf file? Of course within dbase
files I either have to read in two tables (data and sub) or when only
one table is used, I have to create as many records as I have <sub>
entries.
But actually I don't really know where to start. So If you have some
lines for me that would be great.
Regards
Fabian
In article <23r3zxxx8zt9.1mxovlbchuxr2$.d...@40tude.net>
fk2...@web.de "Fabian Knauf" writes:
> Hi Pete,
>
> > I don't know if you managed to find a XML-lib, but if not I will
> > happily send you the code I've just created and which might help.
> > It is based on DBF2XML (written by Yamil Bracho) which was posted
> > here a while back, but enhanced to include a metadata section
> > that allows the xml to be used to recreate a DBF from it. The
> > only downside is that it is S87 source (not the ideal platform
> > for this task...) and would benefit from a 5.x conversion.
> >
> > If you would like the sources for DBF2XML and XML2DBF just post
> > here and I'll email to you. Or, if there is a large demand I'll
> > put the code on a web page.
>
> No, until now I'm not a step further.
>
> Actually I can create a XML-file myself easily by writing it step by
> step. My problem is, how to read a xml-file into a dbase table.
This is the same problem that taxed my brain :-)
> Especially when there are multiple (but not known how many) tags within
> one file.
>
> For example:
> <data>
> <number>123</number>
> <sub>
> <first></first>
> <second></second>
> </sub>
> <sub>
> <first></first>
> <second></second>
> </sub>
> </data>
>
> How to get such a structure into an dbf file? Of course within dbase
> files I either have to read in two tables (data and sub) or when only
> one table is used, I have to create as many records as I have <sub>
> entries.
>
> But actually I don't really know where to start. So If you have some
> lines for me that would be great.
The code I have written will create an xml file from a dbf, and
recreate that dbf from the xml. I doubt this code will do
exactly what you need -- in typical usenet fashion -- but might
give you some ideas on how to implement your own XML lib :-)
I'll send it to the email address with which you posted here.
Regards,
And this elicited a "Benutzer nicht bekannt" failure :-(
Please send me your email address to my name at papadelta.co.uk
and I will try to resend...
If you are still interested you can find it here:
<http://www.pdlhost.demon.co.uk/clipper/dbfxml.zip>
The source is not pretty but does appear to work...