The .XFDL
file extension identifies XFDL
Formatted Document files. These belong to the XML-based document and template formatting standard. This format is exactly like the XML file format however, contains a level of encryption for use in secure communications.
XFDL文件扩展名标识XFDL格式的文档文件。它们属于基于xml的文档和模板格式标准。这种格式与XML文件格式完全相同,但是,它包含用于安全通信的加密级别。
I know how to view XFDL files using a file viewer I found here. I can also modify and save these files by doing File:Save/Save As. I'd like, however, to modify these files on the fly. Any suggestions? Is this even possible?
我知道如何使用这里找到的文件查看器来查看XFDL文件。我还可以通过执行File: save / save As来修改和保存这些文件。但是,我想动态地修改这些文件。有什么建议吗?这是可能吗?
Update #1: I have now successfully decoded and unziped a .xfdl
into an XML file which I can then edit. Now, I am looking for a way to re-encode the modified XML file back into base64-gzip (using Ruby or the command line)
更新#1:我现在已经成功地将.xfdl解码并解压缩到一个XML文件中,然后我可以对其进行编辑。现在,我正在寻找一种方法,将修改后的XML文件重新编码为base64-gzip(使用Ruby或命令行)
3 个解决方案
#1
4
If the encoding is base64 then this is the solution I've stumbled upon on the web link :
如果编码是base64,那么这就是我在web链接上偶然发现的解决方案:
"Decoding XDFL files saved with 'encoding=base64'. Files saved with:
解码XDFL文件以“编码=base64”保存。文件保存:
application/vnd.xfdl;content-encoding="base64-gzip"
are simple base64-encoded gzip files. They can be easily restored to XML by first decoding and then unzipping them. This can be done as follows on Ubuntu:
是简单的base64编码的gzip文件。它们可以通过先解码,然后解压缩它们来轻松地恢复到XML。在Ubuntu上可以这样做:
sudo apt-get install uudeview uudeview -i yourform.xfdl gunzip -S "" < UNKNOWN.001 > yourform-unpacked.xfdl
The first command will install uudeview, a package that can decode base64, among others. You can skip this step once it is installed.
第一个命令将安装uudeview,一个可以解码base64的包。一旦安装完成,您可以跳过此步骤。
Assuming your form is saved as 'yourform.xfdl', the uudeview command will decode the contents as 'UNKNOWN.001', since the xfdl file doesn't contain a file name. The '-i' option makes uudeview uninteractive, remove that option for more control.
假设您的表单保存为“您的表单”。由于xfdl文件不包含文件名,因此uudeview命令将把内容解码为“UNKNOWN.001”。“-i”选项使uudeview非交互式,删除该选项以获得更多的控制。
The last command gunzips the decoded file into a file named 'yourform-unpacked.xfdl'. "
最后一个命令将解码后的文件压缩到一个名为“yourform-unpacked.xfdl”的文件中。”
Another possible solution - here
另一种可能的解决方案——在这里
Side Note: Block quoted < code > doesn't work for long strings of code
附加说明:块引用的< code >对于长串代码不起作用
#2
2
The only answer I can think of right now is - read the manual for uudeview.
我现在能想到的唯一答案是——阅读uudeview的手册。
As much as I would like to help you, I am not an expert in this area, so you'll have to wait for someone more knowledgable to come down here and help you.
虽然我很想帮助你,但我不是这方面的专家,所以你得等更有知识的人过来帮你。
Meanwhile I can give you links to some documents that might help you:
同时我可以给你一些文件的链接,可能会对你有所帮助:
- UUDeview Home Page
- UUDeview主页
- Using XDFLengine
- 使用XDFLengine
- Gettting started with the XDFL Engine
- 开始使用XDFL引擎
Sorry if this doesn't help you.
对不起,这对你没有帮助。
#3
1
You don't have to get out of Ruby to do this, can use the Base64 module in Ruby to encode the document like this:
你不需要从Ruby中跳出来做这个,可以使用Ruby中的Base64模块对文档进行编码:
irb(main):005:0> require 'base64'
=> true
irb(main):007:0> Base64.encode64("Hello World")
=> "SGVsbG8gV29ybGQ=\n"
irb(main):008:0> Base64.decode64("SGVsbG8gV29ybGQ=\n")
=> "Hello World"
And you can call gzip/gunzip using Kernel#system:
您可以使用内核#系统调用gzip/gunzip:
system("gzip foo.something")
system("gunzip foo.something.gz")
#1
4
If the encoding is base64 then this is the solution I've stumbled upon on the web link :
如果编码是base64,那么这就是我在web链接上偶然发现的解决方案:
"Decoding XDFL files saved with 'encoding=base64'. Files saved with:
解码XDFL文件以“编码=base64”保存。文件保存:
application/vnd.xfdl;content-encoding="base64-gzip"
are simple base64-encoded gzip files. They can be easily restored to XML by first decoding and then unzipping them. This can be done as follows on Ubuntu:
是简单的base64编码的gzip文件。它们可以通过先解码,然后解压缩它们来轻松地恢复到XML。在Ubuntu上可以这样做:
sudo apt-get install uudeview uudeview -i yourform.xfdl gunzip -S "" < UNKNOWN.001 > yourform-unpacked.xfdl
The first command will install uudeview, a package that can decode base64, among others. You can skip this step once it is installed.
第一个命令将安装uudeview,一个可以解码base64的包。一旦安装完成,您可以跳过此步骤。
Assuming your form is saved as 'yourform.xfdl', the uudeview command will decode the contents as 'UNKNOWN.001', since the xfdl file doesn't contain a file name. The '-i' option makes uudeview uninteractive, remove that option for more control.
假设您的表单保存为“您的表单”。由于xfdl文件不包含文件名,因此uudeview命令将把内容解码为“UNKNOWN.001”。“-i”选项使uudeview非交互式,删除该选项以获得更多的控制。
The last command gunzips the decoded file into a file named 'yourform-unpacked.xfdl'. "
最后一个命令将解码后的文件压缩到一个名为“yourform-unpacked.xfdl”的文件中。”
Another possible solution - here
另一种可能的解决方案——在这里
Side Note: Block quoted < code > doesn't work for long strings of code
附加说明:块引用的< code >对于长串代码不起作用
#2
2
The only answer I can think of right now is - read the manual for uudeview.
我现在能想到的唯一答案是——阅读uudeview的手册。
As much as I would like to help you, I am not an expert in this area, so you'll have to wait for someone more knowledgable to come down here and help you.
虽然我很想帮助你,但我不是这方面的专家,所以你得等更有知识的人过来帮你。
Meanwhile I can give you links to some documents that might help you:
同时我可以给你一些文件的链接,可能会对你有所帮助:
- UUDeview Home Page
- UUDeview主页
- Using XDFLengine
- 使用XDFLengine
- Gettting started with the XDFL Engine
- 开始使用XDFL引擎
Sorry if this doesn't help you.
对不起,这对你没有帮助。
#3
1
You don't have to get out of Ruby to do this, can use the Base64 module in Ruby to encode the document like this:
你不需要从Ruby中跳出来做这个,可以使用Ruby中的Base64模块对文档进行编码:
irb(main):005:0> require 'base64'
=> true
irb(main):007:0> Base64.encode64("Hello World")
=> "SGVsbG8gV29ybGQ=\n"
irb(main):008:0> Base64.decode64("SGVsbG8gV29ybGQ=\n")
=> "Hello World"
And you can call gzip/gunzip using Kernel#system:
您可以使用内核#系统调用gzip/gunzip:
system("gzip foo.something")
system("gunzip foo.something.gz")