SqlXml SqlXml SqlXml SqlXml Class

定义

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

public ref class SqlXml sealed : System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
[System.Serializable]
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
继承
SqlXmlSqlXmlSqlXmlSqlXml
属性
实现

注解

此类包含的实例XmlReader的派生类型,并通过实现添加特定于 SQL 的功能,例如数据库样式 null 语义INullable接口。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. 当使用 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() SqlXml() SqlXml()

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

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

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

SqlXml(XmlReader) 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

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

Null Null Null Null

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

Value Value Value Value

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

方法

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

作为 SqlXml 来获取此 XmlReader 的 XML 内容的值。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()

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

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

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

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

创建当前 Object 的浅表副本。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)

显式界面实现

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

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

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

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

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

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

适用于

另请参阅