OpenFromFile |
Top Previous Next |
The OpenFromFile() method loads an XML document from the file system into the CommandoXML object.
Example VBScript Code
Private Sub DemoXML()
Dim oXML, ndRoot, ndChild Dim sBuff, i
'Create the object Set oXML = oUTILITIES.NewCommandoXMLObject()
'Using the With / End With statements make for easy shortcuts With oXML 'Open an XML File If Not .OpenFromFile(oUTILITIES.ApplicationPath & "MyFileName.XML") Then SMEvent.Raise "ERROR", "XML File Open Failed" End If Set ndRoot = .GetRootElement() 'Show the XML MsgBox .XML, vbInformation, "The CommandoXML Object" End With 'Clean up the objects Set ndRoot = Nothing Set ndChild = Nothing Set oXML = Nothing
End Sub
See Also: oUTILITIES.NewCommandoXMLObject() |