开发者

Generating text file from database

I have a requirement to hand-code an text file from data residing in a SQL table. Just wondering if there are any best practices here. Should I write it as an XMLDocument first and transform using XSL or just use Streamwriter and skip transformation altogether? The generated text f开发者_运维百科ile will be in EDIFACT format, so layout is very specific.


The normal thing to do is just write the EDIFACT data directly.

Creating it as an XMLDocument and transforming it to EDIFACT might be useful if there's a library already available to do the transformation. I say this because there's a lot of language support for XML output.

I can't see how XSL will help you here, but I've never had to output EDIFACT data.


http://www.stylusstudio.com/edi/XML_to_EDIFACT.html

This URL has an example XSLT for translating XML to EDIFACT which might solve your problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜