Quantcast
Viewing all articles
Browse latest Browse all 27

Created Issue: XIncludingReader.WhitespaceHandling doesn't seem to do anything

Maybe it's just me, but it doesn't appear that XIncludingReader.WhitespaceHandling actually does anything. No matter what I set it to, I always end up with whitespace nodes.

I implemented a workaround in the code that may be useful. In XIncludingReader.cs, Read(), before the switch (_reader.NodeType) I added:

if (_reader.NodeType == XmlNodeType.Whitespace && _whiteSpaceHandling != WhitespaceHandling.All)
_reader.Read();

This makes everything work as I'd expect for WhitespaceHandling.None and WhitespaceHandling.All (admittedly, WhitespaceHandling.Significant isn't handled properly by this).

Is there somewhere else that XIncludingReader.WhitespaceHandling is supposed to work?

Viewing all articles
Browse latest Browse all 27

Trending Articles