ODAC

TOraXML.GetSchema Method

Determines the based schema document, schema URL and root element used for the current XMLType creation.

Class

TOraXML

Syntax

procedure GetSchema(SchemaDoc: TOraXML; var SchemaURL: string; var RootElem: string);

Parameters
SchemaDoc
Holds a destination TOraXML object which holds the operation result.
SchemaURL
Holds the schema URL.
RootElem
Holds the root element declared in schema.

Remarks

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.

Example

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; 

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback