DB2 V9.7 for Linux, UNIX, and Windows

DB2ResultSet.GetXmlSchemaSet(IBM.Data.DB2Types.DB2XsrObjectId) 方法

返回给定 DB2XsrObjectId 的所有模式文档的 XmlSchemaSet 对象。

名称空间:
IBM.Data.DB2
组合件:
IBM.Data.DB2(在 IBM.Data.DB2.dll 中)

语法

[Visual Basic]
Public Function GetXmlSchemaSet( _
   ByVal xsrObjectId As DB2XsrObjectId _
) As XmlSchemaSet
[C#]
public XmlSchemaSet GetXmlSchemaSet(
   DB2XsrObjectId xsrObjectId
);
[C++]
public: XmlSchemaSet* GetXmlSchemaSet(
   DB2XsrObjectId xsrObjectId
);
[JScript]
public function GetXmlSchemaSet(
   xsrObjectId : DB2XsrObjectId
) : XmlSchemaSet;

参数

xsrObjectId
要搜索的 DB2XsrObjectId

返回值

用来验证给定列的所有模式文档的 XmlSchemaSet 对象。

注释

示例

[C#] 以下示例演示如何使用 GetXmlSchemaSet 方法。XmlReader

[C#]
  public static string getProdData(DB2Connection conn)
  {
    String xmlString = "";
    DB2XsrObjectId xmlSchemaId;
    String cmdSQL = "SELECT description, XMLXSROBJECTID(description) FROM product";
    DB2Command cmd = new DB2Command(cmdSQL, conn);
    DB2DataReader reader = cmd.ExecuteReader();
         
    while (reader.Read())
      {
               DB2Xml description = reader.GetDB2Xml(0);
      xmlSchemaId = reader.GetDB2XsrObjectId(1);
      if (!xmlSchemaId.IsNull)
      {
        XmlSchemaSet sc = reader.GetXmlSchemaSet(xmlSchemaId);
      }
      xmlString += description.GetString();
    }
    reader.Close();

    return xmlString;
  }

版本信息

最近一次更新
本主题在 IBM DB2 V9.5 中进行了最近一次更新
.NET Framework 版本
支持版本:2.0、3.0、3.5 和 4.0
IBM 数据服务器客户机
支持版本:IBM DB2 V9