New to XML, but has some intresting things to say..

G

gopal srinivasan

Hi I am novice to XML, but I am excited abt XML. I have few queries

1. Can XML read the data from any database.

If yes, then

Suppose I have a MSAccess database and i have say some 5 tables.
Can I write a query to access say 200 records and display it in
IE.i.e. Internet Explorer.

So I can first establish conn. to database, then retirieve these rows
and display it in IE. that means can I use XML to display this in
IE..How this can be done ?

Can we take this message further ?

Cheers,
Gopal Srinivasan.
 
J

Johannes Koch

gopal said:
Hi I am novice to XML, but I am excited abt XML. I have few queries

1. Can XML read the data from any database.

No, _XML_ cannot do that. But you can use a programming language to
retrieve data from the database and produce some XML from that.
 
R

Rolf Kemper

Hi Gopal,

creating xml from database depends on what the database can do for you
already.
We run MS SQLServer / IIS and use the FOR XML AUTO part of T-SQL a
lot.
I'm not sure whether MSAccess has similar support yet, but I can
imagine that microsoft has support in place here. In case I have some
time left I will make a trial.

Second thing is with IIS. It accepts so-called templates (a kind of
xml file with a query in it). See example below.

This is extremely convinient if you have to create some web output as
result of a whatever quey batch.
You just create a file like below and an xslt to make the HTML out of
the xml result set.

May be you should tell a bit more about your environment, because our
solution is quite specific for our smal intranet use.

Rolf

################################# example file
#######################

<?xml-stylesheet type="text/xsl"
href="\\etc.nec.de\xml\XML\XSLT\QsIsoLinks.xslt"?>
<QsIsoLinks xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<Boxes>
<sql:header>
<sql:param name="Me">Etc</sql:param>
</sql:header>
<sql:query>
DECLARE @id int
SELECT @id=Employees_ID FROM smdb.dbo.Employees WHERE
UniqueLogin=@Me
SELECT md.* , BoxName , eo.ETCOrga_ID , eo.BelongsTo FROM
smdb.dbo.GetMyDepartmentBoxes(@id) md
INNER JOIN smdb.dbo.const_ETCOrga eo ON eo.ETCOrga_ID =
md.ETCOrga_ID FOR XML AUTO
</sql:query>
</Boxes>
<Links>
<sql:query>
SELECT lnk.* , dc.DocClasses_ID , dc.DocClass , dt.DocType FROM
smdb.dbo.QsIsoLinks lnk
LEFT JOIN smdb.dbo.const_DocClasses_tab dc On
lnk.DocClasses_ID=dc.DocClasses_ID
LEFT JOIN smdb.dbo.const_DocTypes_tab dt ON
lnk.DocTypes_ID=dt.DocTypes_ID
FOR XML AUTO
</sql:query>
</Links>
</QsIsoLinks>
######################## end ############################
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top