帮我解释 XML 和其他标记语言的好处

发布于 2024-08-03 15:23:52 字数 238 浏览 2 评论 0原文

我试图让公司的一些高级人员相信在我们的两个系统之间以结构化格式传输数据的优势。

目前,一个系统输出平面文本文件,并且必须编写复杂的解析器来提取另一侧的数据。每次数据改变,“位置”都要调整,维护和测试很头疼。

这里的双方都有用于创建和操作 XML 的内置工具,因此我所追求的是一篇有说服力的文章、文档、博客文章等,介绍 XML(或任何其他标记语言)作为平面文本的替代方案,目标人群可能是:以前没有使用过它。

非常感谢

I am trying to convince some senior people at my company of the advantages of transmitting data in a structured format between two of our systems.

Currently one system outputs flat text files and complicated parsers have to be written to extract the data on the other side. Every time the data is changed, the 'positions' have to be adjusted and it's a headache to maintain and test.

Both sides here have inbuilt facilities for creating and manipulating XML, so what I'm after is a persuasive article, document, blog post, etc introducing XML (or any other markup language really) as an alternative to flat text aimed at people who may not have worked with it before.

Many thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

合久必婚 2024-08-10 15:23:53

由于您要说服的是高级人士,因此我认为没有任何文章会有所帮助,因为通常它会恢复到金钱。尝试以这种方式工作并解释他们将节省多少钱(例如......每次进行修改时,XML 解决方案都需要更少的时间来编写,时间等于金钱,所以......你明白了)。

您可以改为搜索有关已成功更改类似实施的其他公司的新闻。可行的解决方案比理论上的解决方案更好。

请注意,如果您想要引入的新 XML 实现出现问题,这可能会返回并影响您的资产(例如,XML 比平面文件更详细,因此系统之间的通信可能会更慢)。

中间解决方案是改进读取/写入这些文件的工具。看看FlatWorm,它可能对你有帮助。

Since it is senior people you are trying to convince, I think no article will help since usually it resumes to money. Try working that way and explain how much money they will save (something like... the XML solution takes less time to write each time modifications are made, time equals money, so... You get the idea).

You could instead search for news about other companies that have successfully changed similar implementation. A working solution is better than a theoretical one.

Be careful that this might return and bite your asset if something goes wrong with the new XML implementation you want to introduce (e.g. XML is more verbose than a flat file so you might have slower communication between the systems).

An intermediary solution would be to improve the tool that reads/writes these files. Take a look at FlatWorm, it might help you.

羅雙樹 2024-08-10 15:23:53

我的理由:

  • 无需担心数据
    'positions'。

  • 符合标准且不受约束
    使用第二个系统(这是一个
    布局/打印包)。

  • 在一定程度上是人类可读的。

My reasons:

  • No need to worry about data
    'positions'.

  • Standards compliant and not tied to
    using the second system (which is a
    layout/printing package).

  • Human readable, to an extent.

初与友歌 2024-08-10 15:23:52

首先,不要低估自己。热情会赢得他们的支持。这是像这样的战斗中最重要的因素。此外,真相就在你这边。毕竟它是可扩展标记语言。可扩展性就在名字里!

这里有几篇文章可以帮助您...

Don't underestimate yourself, first. Passion will win them over. It's the most important ingredient in a fight like this. Besides, truth is on your side here. It is extensible markup language after all. Extensible is in the name!

Here are a couple of articles to help you ...

只怪假的太真实 2024-08-10 15:23:52

不知道任何临时文章,但有一些优点:

  • 各种各样的 XML 解析器已经可用,几乎适用于每种语言。
  • 结构化数据使编码变得更加容易 - 例如“选择每个标签并获取属性def的值”比“转到第 n 行,抓取第 20-30 个字符”。
  • 易于手动编辑(例如更改一个值) - 文本编辑器中的语法突出显示使这变得更加容易。
  • 可变长度值,因此当数据发生变化时无需重写解析器。
  • 轻松转换为其他格式,例如 HTML 以及 Word/Excel/OpenOffice 格式。
  • 通过 DTD 实现数据完整性
  • 数据可以移植到其他系统,并且可以简单地用另一种语言进行解析。使用自定义解析器意味着从头开始重写...

唯一想到的缺点是文件大小可能更大。通过压缩,差异可以忽略不计,并且大小可能并不重要。

Don't know of any articles off-hand but a few advantages:

  • Wide variety of XML parsers already available for practically every language.
  • Structured data makes coding much easier - e.g. "select every <abc> tag and grab the value of attribute def" is easier to understand than "go to line n, grab characters 20-30".
  • Easy to edit by hand (e.g. changing one value) - syntax highlighting in text editors makes this even easier.
  • Variable-length values, so no need to rewrite parser when data changes.
  • Easy conversion to other formats like HTML and maybe Word/Excel/OpenOffice formats.
  • Data integrity via DTDs.
  • Data is portable to other systems and could be parsed by another language trivially. With a custom parser it means rewriting from scratch...

The only disadvantage that springs to mind is that the file size may be greater. With compression the difference is negligible and the size may not matter anyway.

衣神在巴黎 2024-08-10 15:23:52

我读过的最有说服力的论点之一是 Jim Melton 和 Stephen Buxton 所著的《Querying XML》一书的开头

http://www.amazon.com/exec/obidos/ASIN/1558607110/veronicabuxto-20?creative=327641&camp=14573&adid=0X99VG0WVGNVSQGWKFFE&link_code=as1

它文档XML 语言、灵活性方面的突出和有用的要点以及为什么您希望将它用于特定的功能。

保持高涨的热情,但不要过于狂热。您可能会考虑尝试从概念验证开始,一旦完成,您就可以开始运行了!

One of the most persuasive arguments I have ever read is at the start of the book "Querying XML" by Jim Melton and Stephen Buxton

http://www.amazon.com/exec/obidos/ASIN/1558607110/veronicabuxto-20?creative=327641&camp=14573&adid=0X99VG0WVGNVSQGWKFFE&link_code=as1

It documents the language of XML, the salient and useful points around flexibility as well as critically why you would want to use it for a particular piece of functionality.

Keep your enthusiasm high, but step back from zealotry. You might consider trying for a Proof of Concept to start with and once that is done you'll be off and running!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文