[Mono-bugs] [Bug 79404][Nor] New - SelectSingleNode does not work on nodes with default namespace

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 14 20:48:50 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by fog at initd.org.

http://bugzilla.ximian.com/show_bug.cgi?id=79404

--- shadow/79404	2006-09-14 20:48:50.000000000 -0400
+++ shadow/79404.tmp.29015	2006-09-14 20:48:50.000000000 -0400
@@ -0,0 +1,31 @@
+Bug#: 79404
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: fog at initd.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SelectSingleNode does not work on nodes with default namespace
+
+Description of Problem:
+When some of the nodes in an XML document have a default namespace (i.e.,
+one defined using xmlns="..." without a prefix) using SelectSingleNode with
+an XPath including such nodes always results in a null return value. Using
+a XmlNamespaceManager with the right namespace URI added with an empty
+prefix (resulting in a default namespace in the XmlNamespaceManager) does
+not improve the situation.
+
+I have attached to this report an example program that tries to locate
+"/html/head" in a very simple XHTML document that uses the default XHTML
+namespace as its default namespace. Both versions of the SelectSingleNode
+call fail. By removing the xmlns declaration from the XML the text program
+works as expected.


More information about the mono-bugs mailing list