[配置] XML Map端口详解

随着可控文件传输(Managed File Transfer,简称MFT)和电子数据交换(简称EDI)的广泛使用,越来越多用户在传输文件并集成系统时会遇到以下问题:

  • 收到的文件格式不能直接处理,需要中间加工;
  • 需要开发额外的脚本,开发维护又要增加难度和成本;
  • 需要有良好的接口,易于和文件传输系统和业务系统集成。

如果有以上疑问,不妨看看知行EDI系统,支持各类文件格式之间的互相转换。本文将主要介绍XML 格式之间的映射和转换。

在开始映射和转换之前,一定要先准备好输入文件格式和输出文件格式的映射关系表。

有了关系映射表,就可以开始写映射代码。在知行EDI系统中有专门用于处理XML 格式文件之间映射关系的端口,即XML Map端口。

端口设置

先介绍下端口的设置。

设置

在开始代码之前,需要配置以下信息:

  • Source File(输入文件): 输入文件的示例文件。输入的文件必须只包含示例文件中的节点,结构可以循环;
  • Destination File(输出文件): 输出文件的示例文件。输出的文件格式将与示例文件基本一致,结构可能循环;
  • Automation Settings(自动设置):自动发送。自动检测在send文件夹下的文件,并完成转换。

在知行EDI系统中,可以将端口连接起来形成工作流。XML Map的上下游端口为Database端口时,可以直接将Database 端口的模板作为输入/输出文件示例。

高级设置

还提供一些允许用户自定义的设置:

  • 输入文件夹 (Send) : 输入文件存放的文件夹

  • 输出文件夹 (Receive) : 输出文件存放的文件夹

  • 已发送文件夹 (Sent) : 已处理的文件存放的文件夹

  • 最大线程数 (Max Workers) : 本端口分配的线程数

  • 最大文件数 (Max Files) : 本端口可处理的最大文件数

  • 本地文件名 (Local File Scheme) : 输出文件的文件名称规则

  • 发送过滤 (Send Filter) : 输入文件的处理过滤条件

映射

在上传输入和输出文件示例文件后,在Mappings区域会加载出输入和输出文件的结构,如下:

  1. 支持拖拽:根据输入文件和输出文件的映射关系,可以将输入文件中节点的值拖拽到输出文件中对应的节点上。
  2. 支持循环:根据输入文件和输出文件的映射关系,可以将输入文件中可能会循环的节点拖拽到输出文件中对应的节点上,输出文件的节点必须包含子节点。
  3. 支持条件:选择一个节点,点击 ,添加条件。
  4. 支持添加兄弟节点:选择一个节点,右键选择“Add Sibling”即可添加兄弟节点。
  5. 支持添加子节点:选择一个节点,右键选择“Add Child”即可添加子节点。
  6. 支持添加父节点:可以先添加一个子节点或者父节点,再给该节点添加子节点,即添加成功父节点。
  7. 支持编辑节点:选择一个节点,点击 ,编辑节点名称;也可以右击“Edit Node”,编辑节点。
  8. 支持删除节点:选择一个节点,点击 ,删除节点;也可以右击“Delete Node”,删除节点。
  9. 支持添加自定义节点:选择一个节点,右键选择“Add Script Node”即可添加自定义节点,该节点是运行代码但是不会输出标签。
  10. 支持自定义脚本插入:选择一个节点,点击 ,可以在该节点处添加自定义脚本。
  11. 支持剪切/复制/粘贴节点:选择一个节点,右键选择“Cut”即可剪切子节点,右键选择“Copy”即可剪切子节点,点击”Paste As Child”即可粘贴该节点。
  12. 刷新模板:更新输入文件示例或者输出文件示例后,点击右下角的“refresh”即可刷新,但是未保存前不会修改代码。

其他

  1. 支持对于用户自定义的一些错误或者提示,需要使用RSB脚本实现。可查阅RSB语言实战;
  2. 暂时不支持在图形化界面编辑XML的属性,输出文件的属性和示例文件中的属性保持一致。

了解更多EDI讯息,请您电话 150-0298-3180 / 177-8250-8152 或邮件 edi@kasoftware.cn 联系我们,获取 30 天全功能 免费试用 版本EDI软件。
标签: , , , , , , , , , ,
文章分类 edi 电子数据交换, edi方案工作流, mft 管理文件传输, share 知识分享
23 条评论在 “[配置] XML Map端口详解” 上
  1. hosting services说道:

    Hello there! This post could not be written any better!
    Reading through this post reminds me of my previous room mate!

    He always kept talking about this. I will forward this post
    to him. Pretty sure he will have a good read. Many thanks for sharing!

  2. I do consider all of the concepts you have introduced on your post.

    They’re really convincing and will certainly work.
    Nonetheless, the posts are very short for novices.

    May you please prolong them a little from subsequent
    time? Thank you for the post.

  3. Very nice article, just what I needed.

  4. black mass说道:

    Wow! After all I got a web site from where I be able to actually obtain valuable
    information regarding my study and knowledge.

  5. black mass说道:

    I am regular reader, how are you everybody? This article posted at this web site is really fastidious.

  6. cheap flights说道:

    Hi there, its nice post regarding media print, we all be aware of media is a impressive source of information.

  7. cheap flights说道:

    Very descriptive article, I liked that bit.

    Will there be a part 2?

  8. cheap flights说道:

    Terrific work! That is the type of info that are supposed to be shared
    across the net. Disgrace on the search engines for now
    not positioning this put up upper! Come on over and
    visit my website . Thank you =)

  9. cheap flights说道:

    I’m really enjoying the design and layout of
    your website. It’s a very easy on the eyes which
    makes it much more pleasant for me to come here and visit more
    often. Did you hire out a designer to create your theme?
    Excellent work!

  10. cheap flights说道:

    Do you mind if I quote a couple of your articles as long as I provide credit and sources back to
    your website? My website is in the very same area of interest as yours and my visitors would definitely benefit from some of the information you present here.
    Please let me know if this ok with you. Regards!

  11. cheap flights说道:

    This site was… how do I say it? Relevant!! Finally I’ve found something
    that helped me. Kudos!

  12. cheap flights说道:

    Magnificent beat ! I would like to apprentice while you
    amend your web site, how can i subscribe for a blog site?
    The account aided me a acceptable deal. I had been tiny bit acquainted
    of this your broadcast provided bright clear concept yynxznuh
    cheap flights

  13. You could certainly see your skills in the work you write.

    The sector hopes for even more passionate writers such as you who aren’t afraid to say how they believe.
    All the time follow your heart.

  14. cheap flights说道:

    Hi there, I want to subscribe for this web site to get most recent updates, thus where can i do it
    please help out. cheap flights 3aN8IMa

  15. cheap flights说道:

    Hi I am so excited I found your website, I really found you by mistake, while I
    was browsing on Askjeeve for something else, Nonetheless I am here now and would just like to say cheers
    for a fantastic post and a all round enjoyable blog (I also love the theme/design), I don’t have time to look over it all at the moment but I
    have saved it and also added your RSS feeds, so when I have time I will be back
    to read much more, Please do keep up the great b.

    34pIoq5 cheap flights

  16. cheap flights说道:

    Hi, I think your site might be having browser compatibility issues.
    When I look at your blog site in Opera, it looks
    fine but when opening in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then that,
    amazing blog! cheap flights 3aN8IMa

  17. cheap flights说道:

    Hi my friend! I wish to say that this article is awesome,
    great written and come with almost all significant infos.
    I’d like to see more posts like this . cheap flights 34pIoq5

  18. cheap flights说道:

    Hello! I’m at work browsing your blog from my new iphone!
    Just wanted to say I love reading through your blog and look forward to all
    your posts! Keep up the outstanding work!

  19. Highly descriptive article, I liked that bit. Will there be
    a part 2?

  20. I wanted to thank you for this fantastic read!!

    I absolutely enjoyed every bit of it. I have got you bookmarked to look at
    new stuff you post…

  21. We absolutely love your blog and find most of your post’s to be exactly what I’m looking for.
    Would you offer guest writers to write content in your
    case? I wouldn’t mind writing a post or elaborating on some of the subjects you write about
    here. Again, awesome site! adreamoftrains website hosting companies

  22. website host说道:

    Hi there! I could have sworn I’ve been to your blog before but after going through many of the
    articles I realized it’s new to me. Anyways, I’m definitely pleased I discovered it and I’ll
    be book-marking it and checking back often!

  23. website host说道:

    My spouse and I stumbled over here by a different website and thought I should check things out.
    I like what I see so now i am following you. Look forward to
    checking out your web page yet again.

发表评论

电子邮件地址不会被公开。

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">