如何解析 .xfa 文件
希望有人能提供一些有关如何解析 xfa 文件的信息。 我可以很好地解析 csv 或 xml 文件,但是 xfa 文件已经出现,而且我不熟悉这种格式。 看起来像制表符分隔的正文,列元数据位于顶部。
任何人以前处理过这些或者可以指导我如何解析它们?
我使用 vb.net,但任何解决方案的语言都不太相关。
非常感激。
Hoping that someone has some info on how to parse a xfa file. I can parse csv or xml files just fine, but an xfa one has come along and I'm not familar with the format. Looks like tab delimited body with column metadata at the top.
Anyone dealt with these before or can give me a steer on how to parse them?
I use vb.net but the language of any solution isn't too relevant.
Much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
嗯,看来没人知道。 问题是 .xfa 看起来不像“标准”扩展名:毕竟,任何人都可以创建自己的扩展名,从 .xyz 到 .something...
我环顾四周,发现,毫不奇怪('x ') 具有此扩展名的 XML 格式,仅此而已。
指出此类文件的来源、其保存的数据类型可能会有所帮助。 或不。
您将该文件描述为带有标头的简单 TSV(制表符分隔值)。 使用分词器或一些正则表达式来解析是非常简单的,所以我不确定你被困在哪里。
Mmm, looks like nobody has a clue. The problem is that .xfa doesn't look like a "standard" extension: after all, anybody can create its own extension names, from .xyz to .something...
I looked around a bit, found, unsurprisingly (the 'x') an XML format with this extension, not much more.
Indicating where this kind of file come from, what kind of data it holds, might help. Or not.
You describe the file as being a simple TSV (tab separated values) with a header. It is quite trivial to parse, with a tokenizer or some regex, so I am not sure where you are stuck.
我想你可能正在谈论这个:http://en.wikipedia.org/wiki/XFA_forms
这似乎是一个旨在处理该模板的页面: http://www.w3.org/1999/05/XFA/xfa-template-19990614
这些信息应该足以让事情顺利进行。 如果失败,那么您始终可以分析文件本身的模式并从那里开始。 我不认为这太棘手。
无论如何,我希望这会有所帮助。
PS 如果您可以提供该 .xfa 的链接,我们可能可以为您提供更多帮助。
I think you might be talking about this: http://en.wikipedia.org/wiki/XFA_forms
This seemed to be a page that was designed to deal with that template: http://www.w3.org/1999/05/XFA/xfa-template-19990614
That information should be enough to get the ball rolling. If that fails then you can always analyse the file itself for patterns and go from there. I don't see it being too tricky.
Anyway, I hope that helps.
P.S. If you could provide a link to that .xfa we could probably give you more help.
原始帖子称内容看起来像“制表符分隔的正文,顶部有列元数据”。 XFA 表单看起来与此完全不同 - XFA 表单通常使用 *.xdp 扩展名并且是 XML。
The original post says the content looks like "tab delimited body with column metadata at the top". An XFA form doesn't look anything like that - XFA forms typically use a *.xdp extension and are XML.
查看 Adobe 页面:
http://partners.adobe.com/public/ developer/xml/index_arch.html
(Adobe XML Forms Architecture,当前 1400 页)
让 LiveCycle/Acrobat 为您解析它。
Check out the Adobe page:
http://partners.adobe.com/public/developer/xml/index_arch.html
(Adobe XML Forms Architecture, currently 1400 pages)
Let LiveCycle/Acrobat parse it for you.