Converting To XML

Index

    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.

    Example

    EDIDocument ediFile = New EDIDocument();

    // Create loops, segment and elements here

    ediFile.ToXML(“C:\\EDI_XML_File.xml“);

    MessageBox.Show(ediFile.EDIXMLFileString);

    in EDI Document
    Did this article answer your question?