System.Configuration.ConfigXmlWhitespace?
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Has anyone heard of this class? I came across it in a custom config section handler I built on v1.0 (derived from System.Configuration.DictionarySectionHandler). The Create method loops thru an XMLNode to retrieve config file section settings. In v1.0, only ConfigXmlElement objects were in the enumerator (or so it seems). In v1.1, I'm also getting ConfigXmlWhitespace objects. My previous code: IEnumerator enumer = section.ChildNodes.GetEnumerator(); The workaround: IEnumerator enumer = ((XmlElement)section).GetElementsByTagName("myTag").GetEnumerator(); The workaround ensured that only XmlElements named "myTag" would be included in the enumerator.