xml modifications

D

dcleaner

hi there...i'm a begginer level user and i've stumbbled upon a problem a
bit beyond my knowledge. i hope that somebody will be able to help me with
my problem...

the problem is: i'm transforming an Access database to XML with some
adjustements. basicaly i have one main table in which i have my main data
and keys to other tables containing other relevant data.
after exporting my main table to xml i have in some tags only keys to other
tables. and now i want to change those keys to meaningful data.
for instance: after exporting, i have a line like this: <tagZ>1</tagZ>, and
i want to change it to be just an opening tag for something else; <tagQ
attr1="xx" attr2="yy">.the data which must be written in attr1 and attr2
depends upon the number (in this case number 1) inside

the tag (tagZ).
 
B

Bruno Desthuilliers

dcleaner a écrit :
hi there...i'm a begginer level user and i've stumbbled upon a problem a
bit beyond my knowledge. i hope that somebody will be able to help me with
my problem...

the problem is: i'm transforming an Access database to XML

with some
adjustements. basicaly i have one main table in which i have my main data
and keys to other tables containing other relevant data.
after exporting my main table to xml i have in some tags only keys to other
tables. and now i want to change those keys to meaningful data.
for instance: after exporting, i have a line like this: <tagZ>1</tagZ>, and
i want to change it to be just an opening tag for something else; <tagQ
attr1="xx" attr2="yy">.the data which must be written in attr1 and attr2
depends upon the number (in this case number 1) inside
the tag (tagZ).

And where's your problem exactly ?-)

More seriously: you don't explain how you export your database to XML,
so it won't be easy to help.

What I'd personnaly do would be to use the db-api (or whatever
appropriate for accessing a .mdb) and a templating system (like genshi
or mako or...) to build the xml file. In which case there's no problem
accessing the related tables (that's what SQL is for, isn't it ?).

Now if you hope to get some serious help, you probably want to give more
details...
 
D

dcleaner

dcleaner a écrit :



And where's your problem exactly ?-)

More seriously: you don't explain how you export your database to XML,
so it won't be easy to help.

What I'd personnaly do would be to use the db-api (or whatever
appropriate for accessing a .mdb) and a templating system (like genshi
or mako or...) to build the xml file. In which case there's no problem
accessing the related tables (that's what SQL is for, isn't it ?).

Now if you hope to get some serious help, you probably want to give
more details...

the tool i used to transform from mdb to xml was the microsoft's access itself (2007
version). i only exported one table for now which is my main table, from the others i
want to extract data so that i could put in inside the newly formed xml. hmm... in
short.... i want to have everything in one xml file...
about sql database... i'm using xml because i want it to be able to run offline.
 
D

Dennis Lee Bieber

the tool i used to transform from mdb to xml was the microsoft's access itself (2007
version). i only exported one table for now which is my main table, from the others i
want to extract data so that i could put in inside the newly formed xml. hmm... in
short.... i want to have everything in one xml file...
about sql database... i'm using xml because i want it to be able to run offline.

The easiest method then would be to export the results of a SELECT
query that JOINs all the associated tables based upon those keys.

Of course, this structure will lose all the integrity inherent in
the original, I presume, normalized tables.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top