OT: how to convert XML data into db fields?
Tiemo Hollmann TB
toolbook at kestner.de
Tue Jul 17 05:50:28 EDT 2012
Hi it's a logical/design question,
I want to read a given XML format into a field based ("db like") LC
application. My question is how you create the assignment between XML-Tags
and LC fields.
Most of the XML-Tags are unique, like <productname>, or the parent nodes
make them unique. Here I can easily create a relation table between the Tags
and the fields. On the other hand there are some common Tags, which appear
multiple times, like <textCode> together with <text>. Here the content of
the first tag <textcode> (01,02,03) defines the db field for <textcode> and
the following <text>. E.G. XML <text> content of <textcode> 01 is the "Main
description", 02 is "Short description". For the assignment of these tags I
could create a table for the relation between the content and the fields.
The two completely opposite approaches in one processing needs a lot of hard
coding where what to do to find the right db field.
Is this the way to process these kind of XML data or am I on the wrong lane
and I don't see the obvious?
Any insights of XML pros appreciated
Tiemo
More information about the use-livecode
mailing list