Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone !

I have used xsd.exe to produce a VB class matching my XSD file.
The latter is rather long, but very simple:

<elema>
	|
	|------> <elemsb>
	|-------------> <attrb1 />
	|-------------> <attrb2 />
	|------> </elemsb>
	|
	|------> <elemsc>
	|-------------> <attrc1 />
	|-------------> <attrc2 />
	|------> </elemsc>
	…etc …
</elema>


Everything works great, the files outputs with the WriteXml() method.
However, in the file

<elema> opens : OK
All <elemb> elements are written at once until </elemb>
Then, all <elemc> elements are written at once until </elemc>
And finally </elema>


And I need to have in my file

Open <elema>
first element of B
first of C
etc …
second of B
second of C,
etc …
And finally </elema>


I need to underline I can't make changes to the xsd as it's provided by a third-party.
In the data, there is always count(ElemsB) = count(ElemsC) = etc …
I'm concerned that I'd have to overload WriteXml()
Thanks for your help.

All the best,
Sebastien.
Posted
Updated 31-Jan-11 6:07am
v5

1 solution

Are those the real element names in your question?

The reason that I ask is that while googling around I came across this[^] thread and wondered if the same thing might be happening to you.
 
Share this answer
 
Comments
sebSICTIAM 1-Feb-11 4:49am    
Hi there ! No there are not real element names, as I cannot disclose them.
And thanks for the link, but no, I do not have the same attributes names accross the xsd !

Cheers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900