projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
XNodeNavigator could be used for a node tree without XDocument, so make it work for...
[mono.git]
/
mcs
/
class
/
System.Xml.Linq
/
System.Xml.Linq
/
XNodeNavigator.cs
diff --git
a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
index 31138a00135f8050caeaa62817476b88edff20a8..84cb492334cf8ffe9c05502aac3e32e9ebd328f2 100644
(file)
--- a/
mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
+++ b/
mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
@@
-413,8
+413,12
@@
namespace System.Xml.Linq
public override void MoveToRoot ()
{
- node = node.Document ?? node;
attr = null;
+ if (node.Document != null)
+ node = node.Document;
+ else
+ while (node.Owner != null)
+ node = node.Owner;
}
}
}