XMLWrite 

Description:           This function converts the instance of a type, as specified by InstanceIn, into XML.

Returns:                    Numeric

Usage:                       Script

Format:                 XMLWrite(XMLProcessorHandle, InstanceIn, XMLOut[, ErrorMessageOut])

Parameters:          XMLProcessorHandle     { XML handle }  { required }  { no default: }

                                                A valid processor, as returned by the function XMLProcessor.

                             InstanceIn    { Object value }  { required }  { no default: }

                                                An  instance of a module, such as would be created by XMLParse (InstanceOUT parameter)

                             XMLOut    { text }  { required }  { no default: }

                                                The XML text to write.

                             ErrorMessageOut    { text }  { optional }  { no default: }

                                                An optional text parameter that allows an error message to be returned from the function.

Comments:            The XML is in the form of a stream and is inserted to the stream passed in XMLOut, starting at its current position.  If XMLOut does not contain a stream, a new BufferStream is created and returned in XMLOut.  Returns 0 if it succeeds.  Otherwise returns a numeric specifying a Windows error code and sets the variable named in the optional ErrorMessageOut parameter to a text error message.

SeeAlso:

MakeTypeInstance | XMLProcessor | XMLAddSchema | XMLParse