473,387 Members | 1,476 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,387 software developers and data experts.

ConfigXmlDocument Handles Whitespace Improperly

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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh DailyT
Nov 12 '05 #1
4 2470
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

"David B. Bitton" <da***@codenoevil.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh DailyT

Nov 12 '05 #2
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

"David B. Bitton" <da***@codenoevil.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh DailyT

Nov 12 '05 #3
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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh Daily™
"Dennis Redfield" <de*************@acadia-ins.com> wrote in message
news:O3**************@tk2msftngp13.phx.gbl...
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

"David B. Bitton" <da***@codenoevil.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh DailyT


Nov 12 '05 #4
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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh Daily™
"Dennis Redfield" <de*************@acadia-ins.com> wrote in message
news:O3**************@tk2msftngp13.phx.gbl...
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

"David B. Bitton" <da***@codenoevil.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
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
da***@codenoevil.com
www.codenoevil.com

Code Made Fresh DailyT


Nov 12 '05 #5

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

Similar topics

2
by: Wolfgang Jeltsch | last post by:
Hello, it is often convenient to insert whitespace into an XML document in order to format it nicely. For example, take this snippet of a notional DocBook XML document: <para> This is a...
0
by: David B. Bitton | last post by:
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...
1
by: Jerry Collings | last post by:
I'm getting improperly nested xml when a column contains null. I modified the first row (customer ALFKI) to have a NULL Address column. I'm using the following XSD Annotated Schema against the...
2
by: Carlitos | last post by:
Hi there, A class in Xerces J-API (Java) called TextImpl contains a property that returns whether the text is ignorable whitespace...
2
by: Carlitos | last post by:
Hi there, A class in Xerces J-API (Java) called TextImpl contains a property that returns whether the text is ignorable whitespace...
0
by: Shan Plourde | last post by:
Hi everyone, I have been using various regular expressions with the ASP.NET RegularExpressionValidator for quite some time. In general it works very well. One of the common regex's that I use...
3
by: David Pratt | last post by:
Hi. I am splitting a string on a non whitespace character. One or more whitespace characters can be returned as items in the list. I do not want the items in the list that are only whitespace (can...
9
by: amattie | last post by:
Does anyone have any idea on how I can strip the extra whitespace in the XML that shows up when I receive a response from an ASP.NET 2.0 webservice? This has been discussed before, but no one has...
13
by: Chaim Krause | last post by:
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.