Generating XML file with information extracted from database

D

DAVALQUI

Hi,
I am quite new to XML and though I am reading extensively lot of
documentation about it in the last few days I do not seem to approach
to what I want.

I want to generate a file with a very simple format where I need to
write three data. Output file will be something like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<weather>
<wind>6</wind>
<visibility>600</visibility>
<direction>NE</direction>
</weather>

This data is taken out from a database periodically so I am thinking
in building an application which reads an input file with data format,
look for data in database and generate output file. I started my
investigations and I came to the conclussion that the input file which
describes the format could be written in XML Schema. That seems to be
O.K.. At the beginning I though to have an extra file where I told my
application where data should be extracted from my database but having
gone through XML documentation this seems to be stupid if I could just
tell in my schema where data should be read. However application which
is going to read output file is not interested at all in knowing
database table and database point where data has been extracted from
so I wonder how to include this information in my schema and tell my
application that this is relevant for it but it should not be included
in the output file. As Schema describes the format to be used in my
XML document I am wondering now if I should not go back to my idea of
two different files, one with XML format definition and the other one
with database points.

Any ideas?
It looks quite easy but XML gets more complicated the more I read
about it.

Thanks.
 

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

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top