XSD for existing XML structure.

M

Mythran

I have an xml file that is currently being used ... I need to make the xsd file
for it for intellisense to work in the .net ide.

So, when I try to do the xsd file, it keeps giving me an error about the tables
being nested and are wrong...so after looking and sifting through google, I'll
try here as well :)

<store id="WalStore">
<product id="Paint1">
<product id="Paint3"></product>
<product id="Paint4">
<product id="Paint5"></product>
<product id="Paint6"></product>
</product>
<product id="Paint7"></product>
<product id="Paint8">
<product id="Paint9"></product>
<product id="Paint10">
<product id="Paint11">
</product>
</product>

</product>

<product id="Paint2">
<product id="Paint12"></product>
</product>
</store>


So, how can I create the XSD for the above xml? Once I can do that, my problem
*should* be solved for my application.

Thanks a bunch!

Mythran the Pro-g(r)am(m)er
 
B

bruce barker

you can't. XSD schemas have rules, and don't support arbitrary xml. in your
case you broke the rule, that an element can not be nested inside itself.
 
M

Mythran

What do you mean "broke the rule". Recursive xml exists and has standards for
it. Is it Microsoft's rule or something? Just wondering :)

What could be a work around for this?

Mythran
 

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

Top