XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 5th, 2003, 06:04 PM
Heavenlyarts Heavenlyarts is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Sheffield
Posts: 3 Heavenlyarts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old December 6th, 2003, 10:01 AM
teedee teedee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 42 teedee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT