I have many xml files. I want bound them each by each.
Samples of my xml files like these
<Brands TopCategory="Categories" SubCategory="Models">
<Brand Id="0" Name="Brand1" />
<Brand Id="1" Name="Brand2" />
</Brands>
<Models TopCategory="Brands" SubCategory="Products, Features">
<Model Id="0" Name="Model1" />
<Model Id="1" Name="Model2" />
</Models>
<Products TopCategory="Models" SubCategory="-1">
<Product Id="0" Name="Product1" />
<Product Id="1" Name="Product2" />
</Products>
<Features TopCategory="Models" SubCategory="Features1, Features2">
<Feature Id="0" Name="Feature1" />
<Feature Id="1" Name="Feature2" />
</Features>
<Features1 TopCategory="Features" SubCategory="-1">
<Feature Id="0" Name="Feature1" />
<Feature Id="1" Name="Feature2" />
</Features>
<Features2 TopCategory="Features" SubCategory="-1">
<Feature Id="0" Name="Feature1" />
<Feature Id="1" Name="Feature2" />
</Features>
I want order like these
Index1 = {"Brands", "Models", "Products", "-1"}
Index2 = {"Brands", "Models", "Features", "Features1", "-1"}
Index3 = {"Brands", "Models", "Features", "Features2", "-1"}
If sub category have "-1" then must finish indexing
What I have tried:
How can i create index order? do you have any sugsesstion?
Thanks