473,326 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

XML export

Hello,

I have a table that i would like to export in XML
The table looks like :

Id | Nom | Cat| Mois | Nom_ex | Note
1 Moi 2 Déc Math 8
1 Moi 2 Déc Geo 6
1 Moi 2 Fév Math 3
1 Moi 2 Fév Geo 5
2 Toi 3 Déc Math 7
2 Toi 3 Déc Geo 2
2 Toi 3 Fév Math 4
2 Toi 3 Fév Geo 7
.................

I would like to have :

<export>
<Eleve>
<id>1</id>
<Nom>Moi</Nom>
<Cat>2</Cat>
<Mois>
<Nom_Mois>Déc<Nom_Mois>
<Matiere>
<Nom_ex>Math</Nom_ex>
<Note>8</Note>
</Matiere>
<Matiere>
<Nom_ex>Geo</Nom_ex>
<Note>6</Note>
</Matiere>
</Mois>
<Mois>
<Nom_Mois>Fév<Nom_Mois>
<Matiere>
<Nom_ex>Math</Nom_ex>
<Note>3</Note>
</Matiere>
<Matiere>
<Nom_ex>Geo</Nom_ex>
<Note>5</Note>
</Matiere>
</Mois>
</Eleve>
<Eleve>
<id>2</id>
<Nom>Toi</Nom>
<Cat>3</Cat>
<Mois>
<Nom_Mois>Déc<Nom_Mois>
<Matiere>
<Nom_ex>Math</Nom_ex>
<Note>7</Note>
</Matiere>
<Matiere>
<Nom_ex>Geo</Nom_ex>
<Note>2</Note>
</Matiere>
</Mois>
<Mois>
<Nom_Mois>Fév<Nom_Mois>
<Matiere>
<Nom_ex>Math</Nom_ex>
<Note>4</Note>
</Matiere>
<Matiere>
<Nom_ex>Geo</Nom_ex>
<Note>7</Note>
</Matiere>
</Mois>
</Eleve>
</export>

I would like to get this result with a SQL SELECT with options "FOR XML
AUTO or ELEMENTS or EXPLICIT" and not with to parse my data to rebuld
the XML tree
Thanks for your help.
Jul 23 '05 #1
0 1186

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: DarkSpy | last post by:
many c++ compilers including "gcc" have not implemented the "export" keyword, but the comeau compilers made it (just i knew). i want to know about: is it too difficult to implement "export"...
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
1
by: Do Park via SQLMonster.com | last post by:
Hello all, I don?t often export data from a table. I am wondering how you export data from a table. I?d like to know how you export in real world. Do you export data from a table to a flat...
6
by: maricel | last post by:
Is there anybody out there who have any idea why EXPORT is relatively slower when putting the output file on a network drive - map drive from onother PC compared to putting it on my local PC drive...
5
by: David | last post by:
I am a little confused by DB2 Backup and Export. I used "db2 backup db QAS to /dev/rmt0" backuping 650GB database to a IBM LTO 3581 (1 drive) only 11 hours. But I used "db2 export to /dev/rmt0...
5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
7
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report is possible. If I could I would use a report to...
1
by: chaitu | last post by:
Hi, Can anybody tell me what the error code for Export is. Like i get the message SQL3104N The Export utility is beginning to export data to file...
5
by: JHNielson | last post by:
I have a somewhat simple question, but have been baffled by it for a while, and now I'm on a tight deadline - have to get it done within 24 hours. I am trying to export a set of files to my hard...
8
by: iheartvba | last post by:
Hi I am using Access 2007 and am trying to export a query to a fixed length text file. I tried using the following code to export the text file: DoCmd.TransferText acExportFixed, , "qryFFRDeFile",...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.