Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 3rd, 2006, 08:55 AM
cashdeskmac
Guest
 
Posts: n/a
Default What's the difference?

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?

  #2  
Old August 3rd, 2006, 03:45 PM
Scott M.
Guest
 
Posts: n/a
Default Re: What's the difference?

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?
>

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles