Framework EDI Reference. Methods and Properties
ediFile. IsXml

Indicates if the file is an XML file.

Syntax:

Remarks

FREDI determines a file to be an Extensible Markup Language (XML) file if the Prolog header of the XML file is syntactically correct.  FREDI currently follows the syntax specification for version 1.0.  For more information regarding the XML version 1.0 specification, please visit the W3C web site at www.w3.org.

For example, in the following XML text, only the shaded portion is verified to be syntactically correct for FREDI to determine that the file is an XML file.

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oFileSystem As Fredi.ediFileSystem
Dim oFile As Fredi.ediFile

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get file system object.
Set oFileSystem = oEdiDoc.GetFileSystem

' Get file object.
Set oFile = oFileSystem.GetFile(App.Path & "\TestFile_856.xml")

If oFile.IsXml Then

MsgBox oFile.FileName & " is an XML document"
Else
MsgBox oFile.FileName & " is NOT an XML document"
End If

Samples