[Mono-bugs] [Bug 641935] Select XmlNodeList from parent XmlNode returns emply list in mono but not .net

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Apr 21 04:09:05 EDT 2011



Atsushi Enomoto <aenomoto at novell.com> changed:

           What    |Removed                     |Added
          Component|Sys.XML                     |Configuration
         AssignedTo|atsushi at ximian.com          |mono-bugs at lists.ximian.com

--- Comment #1 from Atsushi Enomoto <aenomoto at novell.com> 2011-04-21 08:09:04 UTC ---
When I added a debug line like below in ConfigSectionHandler.cs:

            configSettingList = section.SelectNodes("//configSetting");
System.Console.Error.WriteLine ("!!! {0} {1} [{2}] {3}", section.NodeType,
on.Name, section.NamespaceURI, configSettingList.Count);

NET printed: !!! Element DataAccessSettings [] 3
Mono printed: !!! Element DataAccessSettings
[http://schemas.microsoft.com/.NetConfiguration/v2.0] 0

this means, .NET's System.Configuration.dll treats xmlns as if it does not
exist while Mono preserves it.

This behavioral difference affects XmlNode.SelectNodes() expression
interpreter. Any XPath queries against nodes that with xml namespaces must be
prefixed. XPath expression "//configSetting" is to query "configSetting"
element with *no* namespace URI.

A desired fix is to use namespace-eliminating XmlReader in

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list