469,950 Members | 1,872 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

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 1151
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Søren Lund | last post: by
6 posts views Thread by Tabi | last post: by
2 posts views Thread by Laurent Bugnion | last post: by
7 posts views Thread by =?Utf-8?B?RG91Z2llIEJyb3du?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.