This project has moved. For the latest updates, please go here.

...

using EdiFabric.Framework.InterchangeEnvelopes.Edifact;
using EdiFabric.Framework.Parsers;
using EdiFabric.Framework.Exceptions;

...

// get the EDI message as a stream
var sampleEdifactStream = ...

// create a new instance of the parser
IEdiParser ediParser = new EdiParser();

try

{

  // translate to .NET object
  var interchange = ediParser.ToInterchange<INTERCHANGE>(sampleEdifactStream, null);

  // translate to Xml
  XElement parsedXml = ediParser.Serialize(interchange);

}

catch(ParserException ex)

{

  // the exception gives you information for the line in the EDI message, which failed to     process

...

}

Last edited May 6, 2014 at 9:06 AM by DonZoeggerle, version 2

Comments

No comments yet.