LoadXMLDocument - cXMLDOMDocument

Loads an XML Document

Type: Function

Return Data Type: Integer

Parameters: None

Return Value

If pbAsync is False (the default), the return value tells you if the document was successfully loaded, parsed and ready for processing. If pbAsync is True, a return value of True is immediately received, even if the file is not yet fully loaded.


Syntax
Function LoadXMLDocument Returns Integer

Call: Get LoadXMLDocument to IntegerVariable


Description

LoadXMLDocument loads an XML Document. The name of the document is stored in the property psDocumentName that must be set for this function to work correctly.

The pbAsync property determines if loading an XML document (LoadXMLDocument) should be asynchronous and whether the return value of LoadXMLDocument is accurate. See pbAsync for details.

XML documents may be saved using the SaveXmlDocument method.

// create the xml document object
Object oXML is a cXmlDomDocument
End_Object

// set the document name and load it
Set psDocumentName of oXML to "http://localhost/xml/customer.xml"
Get LoadXmlDocument of oXML to bOk

// Do Stuff
Send ProcessThisObject 

// Save XML document with a new name
Set psDocumentName of oXML to ".\MyXmlDocs\NewCustomer.xml"
Get SaveXmlDocument of oXML to bOk

// destroy the XML object
Send Destroy of oXML


LoadXML loads an XML document from a passed string.
LoadXMLFromAddress loads an XML document from data pointed to by an address.

See Also

psDocumentName | SaveXmlDocument | LoadXml | LoadXmlFromAddress