返回给定 DB2XsrObjectId 的所有模式文档的 XmlSchemaSet 对象。
[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;
用来验证给定列的所有模式文档的 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;
}