473,399 Members | 4,177 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.

Custom Section Handler XML parsing

I am trying to create a custom section and section handler in my config
file.

The custom section should be something like;
<appSecurity>
<method name = "Protect the Ice Cream">
<allow group = "admin"/>
<allow group = "ice cream eaters"/>
<deny group= "weightwatchers"/>
<deny user = "hazz"/>
</method>
</appSecurity>

How would I parse this xml in my
Implements IConfigurationSectionHandler where a simple Section Handler looks
like the following;

Dim data As New NameValueCollection()

Dim root As XmlElement = CType(section, XmlElement)

Dim node As XmlNode

For Each node In root.ChildNodes

data.Add(node.Name, node.InnerText)

Next

*************

Thank you,

-greg
Nov 18 '05 #1
1 1234
The context to this question is Rocky's article-> specifically the custom
handler section.
http://msdn.microsoft.com/library/de...et04222003.asp
-greg

"Hazzard" <ha**@sonic.net> wrote in message
news:OO**************@TK2MSFTNGP09.phx.gbl...
I am trying to create a custom section and section handler in my config
file.

The custom section should be something like;
<appSecurity>
<method name = "Protect the Ice Cream">
<allow group = "admin"/>
<allow group = "ice cream eaters"/>
<deny group= "weightwatchers"/>
<deny user = "hazz"/>
</method>
</appSecurity>

How would I parse this xml in my
Implements IConfigurationSectionHandler where a simple Section Handler looks like the following;

Dim data As New NameValueCollection()

Dim root As XmlElement = CType(section, XmlElement)

Dim node As XmlNode

For Each node In root.ChildNodes

data.Add(node.Name, node.InnerText)

Next

*************

Thank you,

-greg

Nov 18 '05 #2

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

Similar topics

1
by: Hazzard | last post by:
I am trying to create a custom section and section handler in my config file. The custom section should be something like; <appSecurity> <method name = "Protect the Ice Cream"> <allow group =...
0
by: Søren Lund | last post by:
Hello, I have implemented a custom config section handler by implementing the IConfigurationSectionHandler interface. I have registered this handler in web.config and everything works fine ......
2
by: murl | last post by:
Below is what i have as the custom section in the web.config file... <?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- register local configuration handlers --> <configSections>...
3
by: rdcpro | last post by:
Hi all, I've been building a nifty deserializing configuration handler that I use in conjunction with my web.config in an ASP.NET web app. This is working quite well, but I'm planning on...
3
by: Hope Paka | last post by:
I want to use my custom url extension instead of .aspx. I can achieve this by writing a custom handler that implements the IHttpHandlerFactory. In the GetHandler method of the IHttpHandlerFactory i...
6
by: Tabi | last post by:
Hi, I want to create a custom section in my web.config that can hold my custom values. I created a section in web.config as written below. <configSections> <section name="myCustomSection"...
2
by: Laurent Bugnion | last post by:
Hi, I like to develop custom controls for a number of webpages. These controls are often customizable, so that they can be reused in a number of situations. My question is: What is the best...
7
by: =?Utf-8?B?RG91Z2llIEJyb3du?= | last post by:
Hi I've written custom configuration section (inherits from System.Configuration.ConfigurationSection) to simplify the contents of the config file and to make life easier when accessing them in...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.