G
Gieke
hi group,
I'm new here. Worked a bit with xml over the years, and now having a
discussion if something is allowed or not, or good practice or not.
It's about repeating a tag within a tag that contains also other things.
an example to make it clear:
<basicFlightInfo>
<flightDetails>
<departureDate>011008</departureDate>
<departureTime>0834</departureTime>
</flightDetails>
<departureLocation>
<cityAirport>ZWE</cityAirport>
</departureLocation>
<productTypeDetail>D</productTypeDetail>
<productTypeDetail>702</productTypeDetail>
<productTypeDetail>ET</productTypeDetail>
</basicFlightInfo>
Is it allowed to repeat the <productTypeDetail> ?
Would it be better to nest it in another tag, like :
<details>
<productTypeDetail>D</productTypeDetail>
<productTypeDetail>702</productTypeDetail>
<productTypeDetail>ET</productTypeDetail>
</details>
Or is it necessary to do so ?
thanks for advice !
Guido
I'm new here. Worked a bit with xml over the years, and now having a
discussion if something is allowed or not, or good practice or not.
It's about repeating a tag within a tag that contains also other things.
an example to make it clear:
<basicFlightInfo>
<flightDetails>
<departureDate>011008</departureDate>
<departureTime>0834</departureTime>
</flightDetails>
<departureLocation>
<cityAirport>ZWE</cityAirport>
</departureLocation>
<productTypeDetail>D</productTypeDetail>
<productTypeDetail>702</productTypeDetail>
<productTypeDetail>ET</productTypeDetail>
</basicFlightInfo>
Is it allowed to repeat the <productTypeDetail> ?
Would it be better to nest it in another tag, like :
<details>
<productTypeDetail>D</productTypeDetail>
<productTypeDetail>702</productTypeDetail>
<productTypeDetail>ET</productTypeDetail>
</details>
Or is it necessary to do so ?
thanks for advice !
Guido