Framework EDI Reference. Methods and Properties
ediDocument. GetXmlDocument

Gets the XML document object.

Syntax:

Returns:

Object of type FREDI.xmlDocument

Remarks:

The XML document is the starting top level object for processing XML files.  The XmlDocument object allows one to read an EDI document in XML format file.  The XmlDocument supports only the XML format that was created by FREDI.  

Example

Private oEdiDoc As Fredi.ediDocument
Private oSegment As Fredi.ediDataSegment
Private oXmlDoc As Fredi.xmlDocument
...

sEdiFile = sPath & "850.x12.xml"

Set oEdiDoc = New Fredi.ediDocument

'Improves performance by not keeping all the data segment of the EDI file in memory
oEdiDoc.CursorType = Cursor_ForwardOnly

'Load SEF file
oEdiDoc.ImportSchema sSefFile, 0

'instantiates XML object
Set oXmlDoc = oEdiDoc.GetXmlDocument

'Load XML file
oXmlDoc.LoadEdi sEdiFile

'Traverse thru the file, starting with the first segment
Set oSegment = oEdiDoc.FirstDataSegment

While Not oSegment Is Nothing
    ...
    Set oSegment = oSegment.Next
Wend