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


           Summary: XPathNavigator pointing to an Attribute throws exception
                    in DeleteSelf
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: ---


"System.InvalidOperationException : This node cannot be removed since it has no
parent." is thrown in the following test case:

[Test]
public void Test()
{
    XmlDocument document = new XmlDocument();
    document.LoadXml("<test><node date='2000-12-23'>z</node></test>");
    XPathNavigator navigator = document.CreateNavigator();
    XPathNavigator nodeElement = navigator.SelectSingleNode("//node");
    nodeElement.MoveToAttribute("date", string.Empty);
    nodeElement.DeleteSelf();
    Assert.AreEqual("<test><node>z</node></test>", document.OuterXml);
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to