XMLWrite

(Engine-Level Function)

Description: Converts the instance of a type, as specified by XMLNodeTreeIn, into XML.
Returns: Numeric
Usage: Script Only.
Function Groups: File I/O,  XML
Related to: XMLParse | XMLProcessor | XMLAddSchema | XMLCloneNode | XMLCreateNode | XMLDeleteMember | XMLGetNode | GetXMLNodeArray
Format: XMLWrite(XMLProcessorHandle, XMLNodeTreeIn, XMLOut, ErrorMessageOut[, NamespaceDictionary, XSLTString])
Parameters:  
XLProcessorHandle
Required. A valid processor, as returned by the function XMLProcessor.
XMLNodeTreeIn
Required. An XMLNodeTree such as would be created by XMLParse (XMLNodeTreeOut parameter).
XMLOut
Required. A stream variable where the XML text will be placed. See comments.
ErrorMessageOut
Required. A text parameter into which any return error message is placed.
NamespaceDictionary
An optional dictionary of namespaces and prefixes such as would be created by XMLParse (NamespaceDictionary parameter).
XSLTString
An optional string containing an XSLT (extensible style sheet language transform) to be applied to the output XML.
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.
If XSLTString is not a valid XSLT transform, the XML out will not be transformed, but ErrorMessageOut and the return value will be set to indicate the transform failure.