I have an element which can only appear once in my XML document and has 1 attribute. The attribute determines what elements are accepted within this element. For example, my XML document can have this element :
<service type="request">
<type>ukgeo</type>
<area>441280</area>
<pay>card</pay>
</service>
or this one, but not more than 1 service element.
<service type="change">
<info>
<number>441173060201</number>
<subcug>1234</subcug>
<pay>card</pay>
<currency>gbp</currency>
<language>eng</language>
<cash>20.00</cash>
</info>
</service>
I'm new to writing schemas and I'm not sure how to do this, or whether this is a simple or complex problem.
If anybody can help me out it would be really appreciated.
Cheers,
lfc
<service type="request">
<type>ukgeo</type>
<area>441280</area>
<pay>card</pay>
</service>
or this one, but not more than 1 service element.
<service type="change">
<info>
<number>441173060201</number>
<subcug>1234</subcug>
<pay>card</pay>
<currency>gbp</currency>
<language>eng</language>
<cash>20.00</cash>
</info>
</service>
I'm new to writing schemas and I'm not sure how to do this, or whether this is a simple or complex problem.
If anybody can help me out it would be really appreciated.
Cheers,
lfc