Determines the based schema document, schema URL and root element used for the current XMLType creation.
procedure GetSchema(SchemaDoc: TOraXML; var SchemaURL: string; var RootElem: string);
Call the GetSchema method for schema based TOraXML objects to determine the based schema document, schema URL and root element used for the current XMLType creation. SchemaDoc parameter is a destination TOraXML object which holds the operation result. SchemaDoc object must be created before passing it as a parameter. Use SchemaURL parameter to return based schema URL used for creating XMLType object. Use RootElem parameter to return root element declared in schema that is represented by XML document.
var
RetDoc: TOraXML;
ResStr: boolean;
begin
with OraQuery1 do begin
RetDoc := TOraXML.Create();
RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
try
with TOraXMLField(FieldByName('XMLField')).AsXML do begin
GetSchema(RetDoc, SchemaURL, RootElem);
ResStr := RetDoc.AsString;
end;
finally
RetDoc.Free;
end;
end;
end;