I have this XML:
...
<data>
...
<field name="color">red</field>
<field name="doors">4</field>
...
</data>
...
I wonder if it's possible to make a schema that constrains the field elements, so the first field name must be color, next one doors, etc. It'd also be very useful if the data type could be constrained, e.g. color is a string, doors is a decimal.
The problem I'm facing is that all elements have the same name, "field", so I don't know how to constrain them in a sequence.
Thanks a lot for your help.
...
<data>
...
<field name="color">red</field>
<field name="doors">4</field>
...
</data>
...
I wonder if it's possible to make a schema that constrains the field elements, so the first field name must be color, next one doors, etc. It'd also be very useful if the data type could be constrained, e.g. color is a string, doors is a decimal.
The problem I'm facing is that all elements have the same name, "field", so I don't know how to constrain them in a sequence.
Thanks a lot for your help.