DB2®ResultSet.GetXmlSchemaSet(IBM®.Data.DB2Types.DB2XsrObjectId) Method
Returns an XmlSchemaSet object of all the schema documents for the given DB2XsrObjectId.
- Namespace:
IBM.Data.DB2
- Assembly:
IBM.Data.DB2
(inIBM.Data.DB2.dll
)
Syntax
[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;
Parameters
- xsrObjectId
- The DB2XsrObjectId to search on.
Return value
An XmlSchemaSet object of all the schema documents used to validate the given column.
Remarks
Example
[C#] The following example demonstrates how to use the GetXmlSchemaSet method. 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;
}