Re: XML root level

Subject: Re: XML root level
From: Kai.Grossjohann@xxxxxxxxxxxxxxxxxx (Kai Großjohann)
Date: 26 Aug 1999 17:21:11 +0200
Roland Orre <orre@xxxxxxxxxxx> writes:

> My question is:
> Is there any way that you can have multiple root levels in XML?
> 
> After my reading of several XML books it seems as the root
> element always has the same name as the document type.

You have to have a single root element.  But suppose you wanted the
following: 

,-----
| <scanjob>...</scanjob>
| <jobcontrol>...</jobcontrol>
| <scanjob>...</scanjob>
`-----

Why can't you just say the following?

,-----
| <jobspec>
|     <scanjob>...</scanjob>
|     <jobcontrol>...</jobcontrol>
|     <scanjob>...</scanjob>
| </jobspec>
`-----

Or are the two extra tags (<jobspec> and </jobspec>) really a problem?

If you were using SGML you could specify that the start tag and end
tag of the top-level element can be omitted, but with XML you have to
write them explicitly.

kai
-- 
I like BOTH kinds of music.


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • XML root level
    • Roland Orre - Thu, 26 Aug 1999 05:15:30 -0400 (EDT)
      • Kai Großjohann - Thu, 26 Aug 1999 11:20:39 -0400 (EDT) <=