Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jgzabala@yahoo.com
Starting Member
18 Posts |
Posted - 2008-04-22 : 22:28:44
|
| Hi,I'm new in using xml in sql can you please help meto generate something like this from sql to xml. <?xml version="1.0" encoding="UTF-8" ?> - <PrelimAppl>- <Header> <dtCurrentDate>3/18/08</dtCurrentDate> <ddVessel>6</ddVessel> <ddRanks>Position</ddRanks> <dtDateRqrd>03/31/08</dtDateRqrd> - <PersonalDetails> <Row1 xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:dataNode="dataGroup" /> - <Row2>- <txtLastName>- <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.6.7120.0" xfa:spec="2.1">- <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;text-align:center;font-family:'Myriad Pro';font-size:9pt;font-weight:bold"> Torcato <span style="xfa-spacerun:yes"> </span> </p> </body> </txtLastName>- <txtFirstName>- <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.6.7120.0" xfa:spec="2.1"> <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;text-align:center;font-family:'Myriad Pro';font-size:9pt;font-weight:bold">Ashley</p> </body> </txtFirstName>- <txtNationality>- <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.6.7120.0" xfa:spec="2.1"> <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;text-align:center;font-family:'Myriad Pro';font-size:9pt;font-weight:bold">Indian</p> </body> </txtNationality> <dtDOB>1973-01-26</dtDOB> - <txtPOB>- <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.6.7120.0" xfa:spec="2.1"> <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;text-align:center;font-family:'Myriad Pro';font-size:9pt;font-weight:bold">Mumbai</p> </body> </txtPOB> </Row2> </PersonalDetails>- </Header>- </PrelimAppl>thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-22 : 23:44:48
|
| Where's the source data coming from?Post some source data |
 |
|
|
jgzabala@yahoo.com
Starting Member
18 Posts |
Posted - 2008-04-23 : 01:19:46
|
| Hi,Uhm the data will be extracted from SQL. actually xml file willbe exported to ADOBE and the format should be like that.thanks |
 |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2008-04-23 : 05:19:04
|
| You need to tell us the structure of the SQL tables the data will be extracted from...Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-23 : 05:37:09
|
Read about "FOR XML" queries in Books Online. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
jgzabala@yahoo.com
Starting Member
18 Posts |
Posted - 2008-04-25 : 06:40:17
|
| here is the code select last_name, first_name,middle_name from table for xml autocan you please show me sample on how toinsert some the details as per my sample abovelike <PrelimAppl>- <Header> - <PersonalDetails><Row1 xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:dataNode="dataGroup" /> - <Row2>thanks |
 |
|
|
|
|
|