I have data of the following data schema:
Software + | | Microsoft | + | +--->Windows 10 +-->+ | +--->Windows 7 | | Google | + | +-->Chrome +-->+ +-->Orkut
I want to nest this optimally that is redable by any XML Parser, my initial idea was to do it like this:
<?xml version="1.0"?> <Software Name = "Company Software"> <HeadProduct Name = "Google"> <Product>Chrome</Product> <Product>Orkut</Product> </HeadProduct> <HeadProduct Name = "Microsoft"> <Product>Windows 10</Product> <Product>Windows 7</Product> </HeadProduct> </Software>
However, my gut tells me this is a problem and definitely not what I intended. Here is why:
Microsoft are just attributes,
Windows 10 and
Orkut are elements. I my mind somewhere I would have liked
Microsoft as elements as well. To summarize, I don not think I have correctly translated the schema to XML.
Any help will be beneficial.