XML-Schema with undefined item count

Usalaypaita

New Member
I have a little trouble making an XML-Schema.Here's a little example for what I have in my items.xml\[code\]<items> <category name="Sample Category #1"> <category name="Sample Subcategory #1.1"> <object> <name>Sample Inner Object</name> <desc>Sample Description</desc> <object> </category> <object> <name>Sample Name</name> <desc>Sample Description #2</desc> <object> </category> <category name"MyCat #2"> <object> <name>Another Object</name> <desc>Another Description</desc> <object> </category></items>\[/code\]Now, as you already have seen, there can be 'infinite' subcategories in a category. They can contain objects but their parents can also contain objects. That describes my problem:How do I define in a xsd that I want to have -Elements in my first layer but also 'infinite' possibilites in the sub-layers or just objects (containing these two elements).Is that possible with xsd (I think so but I dont know how) or is my choice to use xml for this kind of 'database' completely wrong?PS: I want to implement this structure later in C#.
 
Back
Top