Save()

Top  Previous  Next

Object: EHL7.QSXML

FileName: EHL7.dll

 

METHOD

 

Name: Save()

Parameters:

1.strFileName (String) the path/filename of the XML file you wish to save the document into

Returns: Boolean

Description: Saves the xml document into a file.  The file must not exist or the method will return False and IsError will be set to true.

 

See Also: OpenFromFile(), OpenFromString()

 

Example:

Dim myXMLObj As New EHL7.QSXML

Dim strXML As String

Dim ndRT As Object

Dim ndChild As Object

With myXmlObj

.ClearErrors

Call .OpenFromFile("C:\MyTestFile.XML")

If .IsError Then

  MsgBox .LastError

  .ClearErrors

  Exit Sub

End If

Set ndRT = .GetRootElement()

.SetAttribute ndRT, "ACCESSED", Format$(Now,"dd mmm yyyy hh:nn:ss AMPM")

Kill "C:\MyTestFile.XML"

If Not .Save("C:\MyTestFile.XML") Then

  MsgBox .LastError

End If

Msgbox .XML

End With

Set myXMLObj = Nothing