SqlXml SqlXml SqlXml SqlXml Class


Represents XML data stored in or retrieved from a server.

public ref class SqlXml sealed : System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public sealed class SqlXml : System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
type SqlXml = class
    interface INullable
    interface IXmlSerializable
Public NotInheritable Class SqlXml
Implements INullable, IXmlSerializable


This class contains an instance of an XmlReader-derived type, and adds SQL-specific features such as database-style null semantics by implementing the INullable interface. When you use SqlXml, the XML value that you assign to the SqlXml instance must be consumable by an XmlReader. For unicode data, the Byte Order Mark (BOM) must be present in the stream of data.


SqlXml() SqlXml() SqlXml() SqlXml()

Creates a new SqlXml instance.

SqlXml(Stream) SqlXml(Stream) SqlXml(Stream) SqlXml(Stream)

Creates a new SqlXml instance, supplying the XML value from the supplied Stream-derived instance.

SqlXml(XmlReader) SqlXml(XmlReader) SqlXml(XmlReader) SqlXml(XmlReader)

Creates a new SqlXml instance and associates it with the content of the supplied XmlReader.


IsNull IsNull IsNull IsNull

Indicates whether this instance represents a null SqlXml value.

Null Null Null Null

Represents a null instance of the SqlXml type.

Value Value Value Value

Gets the string representation of the XML content of this SqlXml instance.


CreateReader() CreateReader() CreateReader() CreateReader()

Gets the value of the XML content of this SqlXml as a XmlReader.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet)

Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema()

For a description of this member, see GetSchema().

IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader)

For a description of this member, see ReadXml(XmlReader).

IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter)

For a description of this member, see WriteXml(XmlWriter).

Applies to

See also