[Mono-bugs] [Bug 360374] New: XPath not working with Xml.Linq

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Feb 9 21:04:38 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=360374


           Summary: XPath not working with Xml.Linq
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: miguel at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The following program does not retrieve all the available nodes:

using System;
using System.Linq;
using System.Xml.Linq;
using System.Xml.XPath;

class Class1
{
    static void Main()
    {
        XNamespace ns = "http://novell.com";

        XElement a = new XElement("root",
            new XElement("a"),
            new XElement("B"));
        foreach (object j in a.XPathSelectElements("*"))
        {
            Console.WriteLine(j);
        }
    }
}

To compile use:

gmcs -r:System.Core -r:System.Xml.Linq /tmp/file.cs

It produces:
<a></a>

It should produce:
<a></a>
<B></B>

Actually, in .NET it produces:
<a/>
<B/>

But that might be just a difference in ToString ()


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


More information about the mono-bugs mailing list