HighTechTalks DotNet Forums  

Anyway to Preserve element order with writexml()?

Dotnet XML microsoft.public.dotnet.xml


Discuss Anyway to Preserve element order with writexml()? in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
FerrisUML
 
Posts: n/a

Default Anyway to Preserve element order with writexml()? - 10-11-2007 , 10:38 PM






I've loaded a schema into a dataset and have begun populating the
tables with data from a sql query. Problem is that when I use
writexml(), the format of the xml fails validation against the XSD
file. Whats happening is that the writexml() method doesn not
maintain the order of the XSD file, but instead lists the simple types
above the complex types. The problem isn't with the nested elements
themselves (as they do appear correct), but how they're ordered.

Is there anyway to have writexml maintain the order as specified in my
XSD file? Thanks in advance for any assistance with this issue.


Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: Anyway to Preserve element order with writexml()? - 10-12-2007 , 08:29 AM






FerrisUML wrote:
Quote:
I've loaded a schema into a dataset and have begun populating the
tables with data from a sql query. Problem is that when I use
writexml(), the format of the xml fails validation against the XSD
file. Whats happening is that the writexml() method doesn not
maintain the order of the XSD file, but instead lists the simple types
above the complex types. The problem isn't with the nested elements
themselves (as they do appear correct), but how they're ordered.

Is there anyway to have writexml maintain the order as specified in my
XSD file? Thanks in advance for any assistance with this issue.
Which version of the .NET framework are you using? Can you post a
minimal code sample (schema and .NET code) that allows us the reproduce
the issue?


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.