They are both "well-formed" xml documents and they both descibe your data.
As you point out, they will both be able to have schemas and they will both
be able to be parsed.
Where they differ is in their structure. The second one would probably be
more preferable, since it better describes the semantics of your data.
The thing to remember about XML is that YOU make up the tags and the data.
As long as the XML is well-formed, only you know what the best way to
structure the XML is.
"cashdeskmac" <cashdeskmac@discussions.microsoft.comwrote in message
news:1BA62131-CF5A-48A0-BBF5-2C7BC7140B8C@microsoft.com...
Quote:
Can anyone tell me the difference between these two xml files:
>
<?xml version="1.0" ?>
<Bookshop>
<book title="my first book" author="someone"/>
<book title="another book" author="someone else"/>
>
<DVD title="how to cook" director="TV Chef"/>
<DVD title="Gardening" director="TV gardener"/>
</Bookshop>
>
and:
>
<?xml version="1.0" ?>
<Bookshop>
<Books>
<book title="my first book" author="someone"/>
<book title="another book" author="someone else"/>
</Books>
>
<DVDs>
<DVD title="how to cook" director="TV Chef"/>
<DVD title="Gardening" director="TV gardener"/>
</DVDs>
</Bookshop>
>
Both allow me to generate a schema and fill a DataSet, but is there any
significant difference between them, and is one prefered over the other?
>
|