diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs index 44a32c3a7752b..c0bc601734025 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs @@ -37,7 +37,7 @@ internal XmlElement(XmlName name, bool empty, XmlDocument doc) : base(doc) } } - protected internal XmlElement(string prefix, string localName, string? namespaceURI, XmlDocument doc) + protected internal XmlElement(string? prefix, string localName, string? namespaceURI, XmlDocument doc) : this(doc.AddXmlName(prefix, localName, namespaceURI, null), true, doc) { } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs index 8e995b37e0aa7..834fa4c52c023 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs @@ -1566,7 +1566,7 @@ public virtual void DeleteSelf() DeleteRange(this); } - public virtual void PrependChildElement(string prefix, string localName, string namespaceURI, string value) + public virtual void PrependChildElement(string? prefix, string localName, string? namespaceURI, string? value) { XmlWriter writer = PrependChild(); writer.WriteStartElement(prefix, localName, namespaceURI); @@ -1578,7 +1578,7 @@ public virtual void PrependChildElement(string prefix, string localName, string writer.Close(); } - public virtual void AppendChildElement(string prefix, string localName, string namespaceURI, string value) + public virtual void AppendChildElement(string? prefix, string localName, string? namespaceURI, string? value) { XmlWriter writer = AppendChild(); writer.WriteStartElement(prefix, localName, namespaceURI); @@ -1590,7 +1590,7 @@ public virtual void AppendChildElement(string prefix, string localName, string n writer.Close(); } - public virtual void InsertElementBefore(string prefix, string localName, string namespaceURI, string value) + public virtual void InsertElementBefore(string? prefix, string localName, string? namespaceURI, string? value) { XmlWriter writer = InsertBefore(); writer.WriteStartElement(prefix, localName, namespaceURI); @@ -1602,7 +1602,7 @@ public virtual void InsertElementBefore(string prefix, string localName, string writer.Close(); } - public virtual void InsertElementAfter(string prefix, string localName, string namespaceURI, string value) + public virtual void InsertElementAfter(string? prefix, string localName, string? namespaceURI, string? value) { XmlWriter writer = InsertAfter(); writer.WriteStartElement(prefix, localName, namespaceURI); @@ -1614,7 +1614,7 @@ public virtual void InsertElementAfter(string prefix, string localName, string n writer.Close(); } - public virtual void CreateAttribute(string prefix, string localName, string namespaceURI, string value) + public virtual void CreateAttribute(string? prefix, string localName, string? namespaceURI, string? value) { XmlWriter writer = CreateAttributes(); writer.WriteStartAttribute(prefix, localName, namespaceURI); diff --git a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs index 4d96007127512..676247bba16e7 100644 --- a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs +++ b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs @@ -398,7 +398,7 @@ public override void WriteTo(System.Xml.XmlWriter w) { } } public partial class XmlElement : System.Xml.XmlLinkedNode { - protected internal XmlElement(string prefix, string localName, string? namespaceURI, System.Xml.XmlDocument doc) { } + protected internal XmlElement(string? prefix, string localName, string? namespaceURI, System.Xml.XmlDocument doc) { } public override System.Xml.XmlAttributeCollection Attributes { get { throw null; } } public virtual bool HasAttributes { get { throw null; } } public override string InnerText { get { throw null; } set { } } @@ -2649,12 +2649,12 @@ protected XPathNavigator() { } public virtual void AppendChild(string newChild) { } public virtual void AppendChild(System.Xml.XmlReader newChild) { } public virtual void AppendChild(System.Xml.XPath.XPathNavigator newChild) { } - public virtual void AppendChildElement(string prefix, string localName, string namespaceURI, string value) { } + public virtual void AppendChildElement(string? prefix, string localName, string? namespaceURI, string? value) { } public virtual bool CheckValidity(System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler) { throw null; } public abstract System.Xml.XPath.XPathNavigator Clone(); public virtual System.Xml.XmlNodeOrder ComparePosition(System.Xml.XPath.XPathNavigator? nav) { throw null; } public virtual System.Xml.XPath.XPathExpression Compile(string xpath) { throw null; } - public virtual void CreateAttribute(string prefix, string localName, string namespaceURI, string value) { } + public virtual void CreateAttribute(string? prefix, string localName, string? namespaceURI, string? value) { } public virtual System.Xml.XmlWriter CreateAttributes() { throw null; } public virtual System.Xml.XPath.XPathNavigator CreateNavigator() { throw null; } public virtual void DeleteRange(System.Xml.XPath.XPathNavigator lastSiblingToDelete) { } @@ -2674,8 +2674,8 @@ public virtual void InsertAfter(System.Xml.XPath.XPathNavigator newSibling) { } public virtual void InsertBefore(string newSibling) { } public virtual void InsertBefore(System.Xml.XmlReader newSibling) { } public virtual void InsertBefore(System.Xml.XPath.XPathNavigator newSibling) { } - public virtual void InsertElementAfter(string prefix, string localName, string namespaceURI, string value) { } - public virtual void InsertElementBefore(string prefix, string localName, string namespaceURI, string value) { } + public virtual void InsertElementAfter(string? prefix, string localName, string? namespaceURI, string? value) { } + public virtual void InsertElementBefore(string? prefix, string localName, string? namespaceURI, string? value) { } public virtual bool IsDescendant([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] System.Xml.XPath.XPathNavigator? nav) { throw null; } public abstract bool IsSamePosition(System.Xml.XPath.XPathNavigator other); public virtual string? LookupNamespace(string prefix) { throw null; } @@ -2710,7 +2710,7 @@ public virtual void MoveToRoot() { } public virtual void PrependChild(string newChild) { } public virtual void PrependChild(System.Xml.XmlReader newChild) { } public virtual void PrependChild(System.Xml.XPath.XPathNavigator newChild) { } - public virtual void PrependChildElement(string prefix, string localName, string namespaceURI, string value) { } + public virtual void PrependChildElement(string? prefix, string localName, string? namespaceURI, string? value) { } public virtual System.Xml.XmlReader ReadSubtree() { throw null; } public virtual System.Xml.XmlWriter ReplaceRange(System.Xml.XPath.XPathNavigator lastSiblingToReplace) { throw null; } public virtual void ReplaceSelf(string newNode) { }