 |
 |
 |
I would like to store a number of entries in XML format. For this I
require attributes that describe information common to all entries, as
well as additional information that depends on the type of entry.
What is the best way of solving this in XML, while not contradicting
the standard and ensuring maximum flexibility? I can think of a few
different approaches:
1) Define elements with different names for each type of entry,
something like this:
<greenentry name="something" size="3" greensetting1="x"
greensetting2="y">
<redentry name="something" size="3" redsetting1="x" redsetting2="y">
The problem obviously is that each of the elements would have to
include, in the specification, those attributes (in the case above,
"name" and "size") common to all entries. That doesn't seem ideal.
2) Another solution I can think of, would be to nest specific
information inside a general element, like this:
<entry name="something" size="3">
<greenentry greensetting1="x" greensetting2="y" />
</entry>
<entry name="something" size="3">
<redentry redsetting1="x" redsetting2="y" />
</entry>
None of these approaches seem ideal to me. I would appreciate hearing
any suggestions or recommendations. Have I missed some solution? How
would you do it?
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |