XMLParse 

Description:           This function parses the supplied XML using the specified XML Processor.

Returns:                    Numeric

Usage:                       Script

Format:                 XMLParse(XMLProcessorHandle, XML[, ErrorMessageOut], InstanceOut)

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

                                                A valid processor, as returned by the function XMLProcessor.

                                    XML     { text or stream }  { required }  { no default: }

                                                The XML text to be parsed.  May be either text or a valid stream.  If the text supplied (either in the text value or the stream) is identifiable as a URL, the XML is fetched from that URL.

                             ErrorMessageOut     { text (return value) }  { optional }  { no default: }

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

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

                                                Must be a variable into which the object value of the instance, created by parsing the XML successfully, will be placed.

Comments:            The XML may be either a stream or a text value.  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.

                             The output parameter, InstanceOut, will receive a valid module tree from a validating processor even if validation fails, so long as the XML can be parsed. A valid “InstanceOut” with a valid “ErrorMessageOut” indicates a parse-able message that fails validation. InstanceOut must be slain using the Slay() function once it is no longer needed.

SeeAlso:

MakeTypeInstance | XMLProcessor | XMLAddSchema | XMLWrite