|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
XML problem
I need to produce this XML structure (only fragment shown)
<Citizen citizenRef="1"> <Title>Rear Admiral Sir</Title> <Forename>Horatio</Forename> <Initials>A B</Initials> <Surname>Nelson</Surname> <DisplayName>Rear Admiral Sir Horatio Nelson</DisplayName> <Gender>1</Gender> <DateOfBirth>1979-10-20</DateOfBirth> <Address> <Line>HMS Victory</Line> <Line>Victory Road</Line> <Line>Portsmouth</Line> <Line>Hampshire</Line> <PostCode>HA1 1AA</PostCode> </Address> <Password>test</Password> </Citizen> I'm using a SQL server source and using XML explicit. SQL server insists on putting the address fragment at the end :- <Citizen citizenRef="1"> <Title>Rear Admiral Sir</Title> <Forename>Horatio</Forename> <Initials>A B</Initials> <Surname>Nelson</Surname> <DisplayName>Rear Admiral Sir Horatio Nelson</DisplayName> <Gender>1</Gender> <DateOfBirth>1979-10-20</DateOfBirth> <Password>test</Password> <Address> <Line>HMS Victory</Line> <Line>Victory Road</Line> <Line>Portsmouth</Line> <Line>Hampshire</Line> <PostCode>HA1 1AA</PostCode> </Address> </Citizen> The client howeever needs the Address to follow DateofBirth. Can anyone advise as to how I can achieve this from SQL server (unfortunately the solution is needed yesterday) THanx Jeremy Last edited by Heavenlyarts : December 5th, 2003 at 06:20 PM. |
|
#2
|
|||
|
|||
|
Could you post the SQL query you're using? I'd guess that the order of the DB fields in your SELECT statement may affect the way the XML is generated?
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|