Converting To XML
After creating an EDI document using EDIDocument and settings its loop, segments and elements you can convert it to XML by calling the ToXML() method. Additionally if you want to get a string respresentation of the XML data you can use the EDIXMLFileString property of EDIDocument. The length of the string is restricted by the size of the string data type. Under most circumstances the string will hold the entire EDI file.
EDIDocument ediFile = New EDIDocument();
// Create loops, segment and elements here
in EDI Document