[Mono-bugs] [Bug 376210] New: XPathNavigator pointing to an Attribute throws exception in DeleteSelf
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Apr 2 04:47:01 EDT 2008
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: atsushi at ximian.com
ReportedBy: albright at wesay.org
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list