diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-04-02 12:23:10 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-04-02 12:23:10 +0400 |
commit | bea2f84c76cee82c64c3322043315d1b738ff8a6 (patch) | |
tree | c8df4abae5f3a562c0804b0c8beeda5c9992761d /mcs/class/System.XML/System.Xml.XPath | |
parent | 6d0a2ee39040da9d3a1eb8e52ecb206bf852dcf4 (diff) |
2008-04-02 Atsushi Enomoto <atsushi@ximian.com>
* XPathNavigator.cs : fixed InnerXml to not give up with root node.
Indent InnerXml. Fixed bug #376191.
* XPathNavigatorTests.cs : added test for bug #376191.
svn path=/trunk/mcs/; revision=99623
Diffstat (limited to 'mcs/class/System.XML/System.Xml.XPath')
-rw-r--r-- | mcs/class/System.XML/System.Xml.XPath/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/mcs/class/System.XML/System.Xml.XPath/ChangeLog b/mcs/class/System.XML/System.Xml.XPath/ChangeLog index 2c286150b72..324a8b209d0 100644 --- a/mcs/class/System.XML/System.Xml.XPath/ChangeLog +++ b/mcs/class/System.XML/System.Xml.XPath/ChangeLog @@ -1,3 +1,8 @@ +2008-04-02 Atsushi Enomoto <atsushi@ximian.com> + + * XPathNavigator.cs : fixed InnerXml to not give up with root node. + Indent InnerXml. Fixed bug #376191. + 2008-02-27 Atsushi Enomoto <atsushi@ximian.com> * XPathNavigator.cs : in some MoveTo*() methods, it should allow any diff --git a/mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs b/mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs index bcecf89795f..49725410283 100644 --- a/mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs +++ b/mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs @@ -928,8 +928,11 @@ namespace System.Xml.XPath int depth = r.Depth; if (NodeType != XPathNodeType.Root) r.Read (); + else + depth = -1; // for Root, it should consume the entire tree, so no depth check is done. StringWriter sw = new StringWriter (); XmlWriterSettings s = new XmlWriterSettings (); + s.Indent = true; s.ConformanceLevel = ConformanceLevel.Fragment; s.OmitXmlDeclaration = true; XmlWriter xtw = XmlWriter.Create (sw, s); |