LoadXMLFromVariant - BaseXmlDomDocument

Returns the XML to a variant/BSTR

Type: Function

Return Data Type: Integer

Parameters: Variant vXML

ParameterDescription
vXMLVariant XML string


Return Value

Returns success (non-zero) or failure (zero).


Syntax
Function LoadXMLFromVariant Variant vXML Returns Integer

Call: Get LoadXMLFromVariant vXML to IntegerVariable


Description

pvXML returns the XML to a variant BSTR. LoadXMLFromVariant reverses this process and loads an XML document from a variant BSTR.

The main advantage of this is that it provides a way to store an XML document without using an XML object, which you have to remember to destroy. This is being used by the cClientWebService class to store struct members as XML (when needed).


There is a good chance that developers will never need to directly use these messages, but if they do it would take the form of:

Get pvXML of hoXML to vMyVar
:
Get Create (RefClass(cXMLDomDocument)) to hoNewXml
Get LoadXMLFromVariant of hoNewXml vMyVar to bOk


See VariantStringLength for a detailed explanation of variant BSTR.