XML output tags order

M

Mazen S. Alzogbi

Hi,

I have a web service that returns a serialized version of few business
entities as follows:

<?xml version="1.0" encoding="utf-8" ?>
- <CompanyProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.shuaacapital.com/webservices/">
+ <RatiosAndValues Currency="AED">
+ <GeneralInforamtion>
+ <OwnerShipAndSubsidiaries>
+ <CapitalStructureAndCorporateActions>
</CompanyProfile>

I created a new ASP.NET application and imported the same .asmx file to the
new project, compiled and called the web service and I got the following
result:

<?xml version="1.0" encoding="utf-8" ?>
- <CompanyProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.shuaacapital.com/webservices/">
+ <OwnerShipAndSubsidiaries>
+ <GeneralInforamtion>
+ <RatiosAndValues Currency="AED">
+ <CapitalStructureAndCorporateActions>
</CompanyProfile>

What is/are the factor(s) that make the CLR decide the order of the output
tags? Everything is the same in my case here; the code, StoredProc,
Database, Table, etc. It's just another ASP.NET application on the same
server!

Any explanation/resources would be appreciated.

Cheers,

-Mazen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top