SqlXml 类

定义

表示存储在服务器中的或从服务器中检索的 XML 数据。Represents XML data stored in or retrieved from a server.

public ref class SqlXml sealed : System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public ref class SqlXml sealed : System::Data::SqlTypes::INullable
public sealed class SqlXml : System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public sealed class SqlXml : System.Data.SqlTypes.INullable
[System.Serializable]
public sealed class SqlXml : System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
type SqlXml = class
    interface INullable
    interface IXmlSerializable
type SqlXml = class
    interface INullable
[<System.Serializable>]
type SqlXml = class
    interface INullable
    interface IXmlSerializable
Public NotInheritable Class SqlXml
Implements INullable, IXmlSerializable
Public NotInheritable Class SqlXml
Implements INullable
继承
SqlXml
属性
实现

注解

此类包含一个 XmlReader 派生类型的实例,并通过实现接口添加 SQL 特定的功能,如数据库样式的 null 语义 INullableThis 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. 使用 SqlXml 时,分配给 SqlXml 实例的 XML 值必须由使用 XmlReaderWhen you use SqlXml, the XML value that you assign to the SqlXml instance must be consumable by an XmlReader. 对于 unicode 数据,字节顺序标记 (BOM) 必须出现在数据流中。For unicode data, the Byte Order Mark (BOM) must be present in the stream of data.

构造函数

SqlXml()

创建一个新的 SqlXml 实例。Creates a new SqlXml instance.

SqlXml(Stream)

创建一个新的 SqlXml 实例,以提供来自所提供的 Stream 派生实例中的 XML 值。Creates a new SqlXml instance, supplying the XML value from the supplied Stream-derived instance.

SqlXml(XmlReader)

创建一个新的 SqlXml 实例,并将其与提供的 XmlReader 的内容关联起来。Creates a new SqlXml instance and associates it with the content of the supplied XmlReader.

属性

IsNull

指示此实例是否表示一个 null SqlXml 值。Indicates whether this instance represents a null SqlXml value.

Null

表示 SqlXml 类型的 null 实例。Represents a null instance of the SqlXml type.

Value

获取此 SqlXml 实例的 XML 内容的字符串表示形式。Gets the string representation of the XML content of this SqlXml instance.

方法

CreateReader()

作为 SqlXml 来获取此 XmlReader 的 XML 内容的值。Gets the value of the XML content of this SqlXml as a XmlReader.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetXsdType(XmlSchemaSet)

返回指定的 XmlSchemaSet 的 XML 架构定义语言 (XSD)。Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

IXmlSerializable.GetSchema()

有关此成员的说明,请参见 GetSchema()For a description of this member, see GetSchema().

IXmlSerializable.ReadXml(XmlReader)

有关此成员的说明,请参见 ReadXml(XmlReader)For a description of this member, see ReadXml(XmlReader).

IXmlSerializable.WriteXml(XmlWriter)

有关此成员的说明,请参见 WriteXml(XmlWriter)For a description of this member, see WriteXml(XmlWriter).

适用于

另请参阅