Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Why must <configSections> be 1st element of <configuration> ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joseph Geretz - 30 Sep 2005 19:16 GMT
Parser Error Message:
Only one <configSections> element allowed. It must be the first child
element of the root <configuration> element.

OK, fine, easy enough to fix, I just need to copy and paste this block to
where .NET wants it to be. But I can't help but think, why??? Doesn't this
insistense on ordinal placement run counter to the whole XML 'philosophy'? I
mean the node "/configuration/configSections" should be just as accessible
whether it is the first, last or in between other nodes, as long as it is a
direct child of "/configuration". So why this insistence that it be the
absolute first among its siblings?

- Joe Geretz -
David Browne - 30 Sep 2005 19:33 GMT
> Parser Error Message:
> Only one <configSections> element allowed. It must be the first child
[quoted text clipped - 3 lines]
> where .NET wants it to be. But I can't help but think, why??? Doesn't this
> insistense on ordinal placement run counter to the whole XML 'philosophy'?

No.  An XML schema can be as tight or loose as you like, but like with all
type systems, tighter is better, within reason.

For instance his requirement guarantees that I can read a configSection with
streaming XML reader by hiting the first element node and then skipping
forward to the desired section.  Without a guarantee about the ordering I
would have to load the whole XML document into a DOM and run an XPath query
just to find a single the configSections

David
Joseph Geretz - 30 Sep 2005 20:49 GMT
Thanks for pointing that out David. You're absolutely correct.

- Joe Geretz -

>> Parser Error Message:
>> Only one <configSections> element allowed. It must be the first child
[quoted text clipped - 15 lines]
>
> David

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.