XmlSerializationWriter.WriteAttribute Method

Definition

Instructs an XmlNode object to write an XML attribute that has no namespace specified for its name.

Overloads

WriteAttribute(String, Byte[])

This API supports the product infrastructure and is not intended to be used directly from your code.

Instructs an XmlWriter object to write an XML attribute that has no namespace specified for its name.

WriteAttribute(String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Instructs the XmlWriter to write an XML attribute that has no namespace specified for its name.

WriteAttribute(String, String, Byte[])

This API supports the product infrastructure and is not intended to be used directly from your code.

Instructs an XmlWriter object to write an XML attribute.

WriteAttribute(String, String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Writes an XML attribute.

WriteAttribute(String, String, String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Writes an XML attribute where the namespace prefix is provided manually.

WriteAttribute(String, Byte[])

Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs

Instructs an XmlWriter object to write an XML attribute that has no namespace specified for its name.

This API supports the product infrastructure and is not intended to be used directly from your code.

C#
protected void WriteAttribute(string localName, byte[]? value);
C#
protected void WriteAttribute(string localName, byte[] value);

Parameters

localName
String

The local name of the XML attribute.

value
Byte[]

The value of the XML attribute as a byte array.

Remarks

The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteAttribute(String, String)

Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs

Instructs the XmlWriter to write an XML attribute that has no namespace specified for its name.

This API supports the product infrastructure and is not intended to be used directly from your code.

C#
protected void WriteAttribute(string localName, string? value);
C#
protected void WriteAttribute(string localName, string value);

Parameters

localName
String

The local name of the XML attribute.

value
String

The value of the XML attribute as a string.

Remarks

The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteAttribute(String, String, Byte[])

Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs

Instructs an XmlWriter object to write an XML attribute.

This API supports the product infrastructure and is not intended to be used directly from your code.

C#
protected void WriteAttribute(string localName, string ns, byte[]? value);
C#
protected void WriteAttribute(string localName, string ns, byte[] value);

Parameters

localName
String

The local name of the XML attribute.

ns
String

The namespace of the XML attribute.

value
Byte[]

The value of the XML attribute as a byte array.

Remarks

The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteAttribute(String, String, String)

Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs

Writes an XML attribute.

This API supports the product infrastructure and is not intended to be used directly from your code.

C#
protected void WriteAttribute(string localName, string? ns, string? value);
C#
protected void WriteAttribute(string localName, string ns, string value);

Parameters

localName
String

The local name of the XML attribute.

ns
String

The namespace of the XML attribute.

value
String

The value of the XML attribute as a string.

Remarks

The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteAttribute(String, String, String, String)

Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs
Source:
XmlSerializationWriter.cs

Writes an XML attribute where the namespace prefix is provided manually.

This API supports the product infrastructure and is not intended to be used directly from your code.

C#
protected void WriteAttribute(string? prefix, string localName, string? ns, string? value);
C#
protected void WriteAttribute(string prefix, string localName, string ns, string value);

Parameters

prefix
String

The namespace prefix to write.

localName
String

The local name of the XML attribute.

ns
String

The namespace represented by the prefix.

value
String

The value of the XML attribute as a string.

Remarks

The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1