Groups | Blog | Home
all groups > dotnet xml > june 2004 >

dotnet xml : ConfigXmlDocument Handles Whitespace Improperly


David B. Bitton
6/17/2004 10:13:08 AM
It appears as if System.Configuration.ConfigXmlDocument does not handle
whitespace properly. This stems from an issue I am having with
deserializing an XmlNode (which is actually a ConfigXmlElement). If I
compare the InnerXml to a regular XmlElement, things such as newline's and
tabs (\r\n and \t) they are absent, but if you look at the InnerXml for a
ConfigXmlElement, they are there.

Unfortunately, the presense of these extra control characters throws off the
XmlSerializer because if you look at the dynamically generated code used for
(de)serialization, it doesn't know how to handle a whitespace or
siginificant whitespace element.

It appears if we have two defects here. One is with the ConfigXmlDocument
and the other is with the XmlSerializer. Hopefully they will be addressed
soon.

--
--

David B. Bitton
david@codenoevil.com
www.codenoevil.com

Code Made Fresh DailyT

Dennis Redfield
6/21/2004 8:47:00 AM
now I am really lost. MSDN:
The ConfigXmlDocument type supports the .NET Framework infrastructure and is
not intended to be used directly from your code.

so what's up David.



dlr

[quoted text, click to view]

David B. Bitton
6/21/2004 11:45:35 AM
Ok then, that's all well and good, but the Framework passes a
ConfigXmlElement to the section property of the
IConfigurationSectionHandler.Create() method. So, if it wasn't intended for
general comsumption, then they shouldn't pass it to my routine, but they do.
Therefore, IMHO, it shouldn't be broke.

See my pt.?

--
--

David B. Bitton
david@codenoevil.com
www.codenoevil.com

Code Made Fresh Daily™
[quoted text, click to view]

AddThis Social Bookmark Button