Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2012-06-02 02:04:16 +0400
committerMiguel de Icaza <miguel@gnome.org>2012-06-02 02:04:24 +0400
commitae0feab435b09517ef942c55ff660fa22406b57b (patch)
tree24c6c7cbe940eb93e59a104cdc3d83f6a1542009 /mcs/class/Mono.Xml.Ext
parent00620f0ef0dfc5886381dc8c0f83368ac9dcdbe9 (diff)
Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported
Diffstat (limited to 'mcs/class/Mono.Xml.Ext')
-rw-r--r--mcs/class/Mono.Xml.Ext/Mono.Xml.XPath/XPathNavigatorReader.cs102
1 files changed, 0 insertions, 102 deletions
diff --git a/mcs/class/Mono.Xml.Ext/Mono.Xml.XPath/XPathNavigatorReader.cs b/mcs/class/Mono.Xml.Ext/Mono.Xml.XPath/XPathNavigatorReader.cs
index 6fa769aa35f..8beb07d8d1b 100644
--- a/mcs/class/Mono.Xml.Ext/Mono.Xml.XPath/XPathNavigatorReader.cs
+++ b/mcs/class/Mono.Xml.Ext/Mono.Xml.XPath/XPathNavigatorReader.cs
@@ -543,108 +543,6 @@ namespace Mono.Xml.XPath
return ret;
}
-#if NET_1_1
-#else
- public override string ReadInnerXml ()
- {
- if (ReadState != ReadState.Interactive)
- return String.Empty;
-
- switch (NodeType) {
- case XmlNodeType.Attribute:
- return Value;
- case XmlNodeType.Element:
- if (IsEmptyElement)
- return String.Empty;
-
- int startDepth = Depth;
-
- innerXmlBuilder.Length = 0;
- bool loop = true;
- do {
- Read ();
- if (NodeType ==XmlNodeType.None)
- throw new InvalidOperationException ("unexpected end of xml.");
- else if (NodeType == XmlNodeType.EndElement && Depth == startDepth) {
- loop = false;
- Read ();
- }
- else
- innerXmlBuilder.Append (GetCurrentTagMarkup ());
- } while (loop);
- string xml = innerXmlBuilder.ToString ();
- innerXmlBuilder.Length = 0;
- return xml;
- case XmlNodeType.None:
- // MS document is incorrect. Seems not to progress.
- return String.Empty;
- default:
- Read ();
- return String.Empty;
- }
- }
-
- StringBuilder atts = new StringBuilder ();
- private string GetCurrentTagMarkup ()
- {
- switch (NodeType) {
- case XmlNodeType.CDATA:
- return String.Format ("<![CDATA[{0}]]>", Value.Replace ("]]>", "]]&gt;"));
- case XmlNodeType.Text:
- return Value.Replace ("<", "&lt;");
- case XmlNodeType.Comment:
- return String.Format ("<!--{0}-->", Value);
- case XmlNodeType.SignificantWhitespace:
- case XmlNodeType.Whitespace:
- return Value;
- case XmlNodeType.EndElement:
- return String.Format ("</{0}>", Name);
- }
-
- bool isEmpty = IsEmptyElement;
- string name = Name;
- atts.Length = 0;
- XPathNavigator temp = current.Clone ();
- while (temp.MoveToNextAttribute ())
- atts.AppendFormat (" {0}='{1}'", temp.Name, temp.Value.Replace ("'", "&apos;"));
- if (!IsEmptyElement)
- return String.Format ("<{0}{1}>", name, atts);
- else
- return String.Format ("<{0}{1} />", name, atts);
- }
-
- // Arranged copy of XmlTextReader.ReadOuterXml()
- public override string ReadOuterXml ()
- {
- if (ReadState != ReadState.Interactive)
- return String.Empty;
-
- switch (NodeType) {
- case XmlNodeType.Attribute:
- // strictly incompatible with MS... (it holds spaces attribute between name, value and "=" char (very trivial).
- return String.Format ("{0}={1}{2}{1}", Name, QuoteChar, ReadInnerXml ());
- case XmlNodeType.Element:
- bool isEmpty = IsEmptyElement;
- string name = Name;
- StringBuilder atts = new StringBuilder ();
- XPathNavigator temp = current.Clone ();
- while (temp.MoveToNextAttribute ())
- atts.AppendFormat (" {0}='{1}'", temp.Name, temp.Value.Replace ("'", "&apos;"));
-
- if (!isEmpty)
- return String.Format ("{0}{1}</{2}>", GetCurrentTagMarkup (), atts, ReadInnerXml (), name);
- else
- return String.Format ("{0}", GetCurrentTagMarkup ());
- case XmlNodeType.None:
- // MS document is incorrect. Seems not to progress.
- return String.Empty;
- default:
- Read ();
- return String.Empty;
- }
- }
-#endif
-
public override string LookupNamespace (string prefix)
{
XPathNavigator backup = current.Clone ();