473,399 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to get listing of all sectionGroups in defined subnode of Web.config file?

Hi folks,

based on the Web.config snapshot on bottom I would like to know how to
get a listing of elements in a defined level. Let's assume I would like
to get a list of all sectionGroup elements within the sectionGroup
called "TopLevel". How to do that?

I tried to define the "type" attribute of the sectionGroup elements to
link it to an own settingsHandler, but unfortunately this is not
possible using .Net 1.1.

How to proceed?

Thanks, Frank

<configuration>
<configSections>
<sectionGroup name="TopLevel">
<sectionGroup name="Level1">
<section name="Level1.A" tpye="myOwnSettingsHandler"/>
<section name="Level1.B" tpye="myOwnSettingsHandler" />
</sectionGroup>
<sectionGroup name="Level2">
<section name="Level2.A" tpye="myOwnSettingsHandler"/>
<section name="Level2.B" tpye="myOwnSettingsHandler"/>
</sectionGroup>
<sectionGroup name="Level3">
<section name="Level3.A" tpye="myOwnSettingsHandler"/>
<section name="Level3.B" tpye="myOwnSettingsHandler"/>
</sectionGroup>
</sectionGroup>
</configSections>
</configuration>

Oct 19 '06 #1
1 1581
Why not just treat the web.config like any other XmlDocument and use xPaths?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Frank" <fr***********@infineon.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Hi folks,

based on the Web.config snapshot on bottom I would like to know how to
get a listing of elements in a defined level. Let's assume I would like
to get a list of all sectionGroup elements within the sectionGroup
called "TopLevel". How to do that?

I tried to define the "type" attribute of the sectionGroup elements to
link it to an own settingsHandler, but unfortunately this is not
possible using .Net 1.1.

How to proceed?

Thanks, Frank

<configuration>
<configSections>
<sectionGroup name="TopLevel">
<sectionGroup name="Level1">
<section name="Level1.A" tpye="myOwnSettingsHandler"/>
<section name="Level1.B" tpye="myOwnSettingsHandler" />
</sectionGroup>
<sectionGroup name="Level2">
<section name="Level2.A" tpye="myOwnSettingsHandler"/>
<section name="Level2.B" tpye="myOwnSettingsHandler"/>
</sectionGroup>
<sectionGroup name="Level3">
<section name="Level3.A" tpye="myOwnSettingsHandler"/>
<section name="Level3.B" tpye="myOwnSettingsHandler"/>
</sectionGroup>
</sectionGroup>
</configSections>
</configuration>

Oct 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: grant | last post by:
Hi guys: I am try to build an online query application and would like to generate xml file like following: <survey name="Example Survey"> <question type="text" name="Title" required="yes"/>...
0
by: TRAX | last post by:
I've got a weird problem: when i try to delete a treenode containing subnodes the last node isn't removed: it gives the object reference not set to ... error. Here's my code: Dim lclsSubNode As...
0
by: Patrick.O.Ige | last post by:
I have this code below. All its suppose to do is to EXPAND / COLLAPSE ALL of my treeview. But when i use ASP.NET WEbmatrix it all works fine .. But with VS.NET is says TreeNodeCollection not...
10
by: Steve Taylor | last post by:
I am having trouble understanding the ASP.NET application boundaries. Here's my setup: 1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com). 2. A...
2
by: Fuehner | last post by:
Everyone-- I installed the .NET 2.0 framework on a server that also has version 1.1 installed. A few of my applications override the "appSettings" section in the web.config with a custom config...
2
by: Juuso Hukkanen | last post by:
I need a list of multithreading unsafe C (C99) functions/features. comp.programming.threads provided an initial list of C:ish functions, with following ANSI C functions: asctime, gmtime,...
1
by: James Johnston | last post by:
I've never written a Python program before and I'm trying to read a config file with file path/names (eg. c:\\python24\\*.dll, ... *.exe) to create an output file of filename + md5 values. I'm...
2
by: vijayarl | last post by:
Hi Everyone, Am trying to collate the individual xls files into a single xls file.i have written this code. use strict; use Spreadsheet::WriteExcel; use Spreadsheet::ParseExcel; use...
8
by: Anna Smidt | last post by:
I have declared an include file: // gsl.config must be included for correct build with inline correctly defined etc. #include "gsl/config.h" And the compiler says: Error 4 fatal error C1083:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.