我正在使用XSLT生成一些代码,但是生成的源代码应该本地化在一组不同的文件中。是否有(基于XML的)工具/格式?它可以用来以类似jar/ar/tar的格式存储文件。我在想这样的事情:
<?xml version="1.0"?>
<archive>
<file path="test/Test01.java" content-type="plain-text" checksum="something">
package test;
public class Test01
{
}
</file>
<file path="test/data.properties" content-type="plain-text" checksum="something">
prop1=value1
</file>
</archive>更新了,所以我想生成这种XML存档:使用
xsltproc xml2java.xslt my-structure-defined-as-xml.xml > myarchive.xml或
my-xar-tool cvf myarchive.xml test/data.properties test/Test01.java
#adding test/data.properties
#adding test/Test01.java并提取此档案的内容:
my-xar-tool xvf myarchive.xml
#extracting test/data.properties
#extracting test/Test01.java是否已经有描述此类存档的现有XML?
发布于 2009-07-10 15:56:37
最后,我实现了Xar,这是我需要的工具。请参阅http://code.google.com/p/lindenb/wiki/Xar
https://stackoverflow.com/questions/1093370
复制相似问题